Home / Function/ mapComputeSizeNameToAddonVariantId() — supabase Function Reference

mapComputeSizeNameToAddonVariantId() — supabase Function Reference

Architecture documentation for the mapComputeSizeNameToAddonVariantId() function in DiskManagement.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  8ac4096d_31a5_08b7_6e51_7c487d6ecc14["mapComputeSizeNameToAddonVariantId()"]
  3f4f7d35_5d3a_08a8_61c4_a4247033eecf["DiskManagementForm()"]
  3f4f7d35_5d3a_08a8_61c4_a4247033eecf -->|calls| 8ac4096d_31a5_08b7_6e51_7c487d6ecc14
  c4ac4eed_ae03_690f_089d_aa270ed8e2c6["isInfraInstanceSize()"]
  8ac4096d_31a5_08b7_6e51_7c487d6ecc14 -->|calls| c4ac4eed_ae03_690f_089d_aa270ed8e2c6
  style 8ac4096d_31a5_08b7_6e51_7c487d6ecc14 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/DiskManagement/DiskManagement.utils.ts lines 395–402

export const mapComputeSizeNameToAddonVariantId = (
  computeSize: ProjectDetail['infra_compute_size']
): ComputeInstanceAddonVariantId => {
  const fallback: InfraInstanceSize = 'nano'
  const matchedSize = computeSize && isInfraInstanceSize(computeSize) ? computeSize : undefined
  const sizeKey = matchedSize ?? fallback
  return infraToAddonVariant[sizeKey]
}

Subdomains

Frequently Asked Questions

What does mapComputeSizeNameToAddonVariantId() do?
mapComputeSizeNameToAddonVariantId() is a function in the supabase codebase.
What does mapComputeSizeNameToAddonVariantId() call?
mapComputeSizeNameToAddonVariantId() calls 1 function(s): isInfraInstanceSize.
What calls mapComputeSizeNameToAddonVariantId()?
mapComputeSizeNameToAddonVariantId() is called by 1 function(s): DiskManagementForm.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free