Home / Function/ DbFunctionsSubsections() — supabase Function Reference

DbFunctionsSubsections() — supabase Function Reference

Architecture documentation for the DbFunctionsSubsections() function in FirstLevelNav.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/ProjectAPIDocs/FirstLevelNav.tsx lines 214–242

const DbFunctionsSubsections = (): ReactNode => {
  const { ref } = useParams()
  const snap = useAppStateSnapshot()

  const { data, isLoading } = useOpenAPISpecQuery(
    { projectRef: ref },
    { staleTime: 1000 * 60 * 10 }
  )
  const functions = data?.functions ?? []

  // TODO: handle virtualization of DB functions
  return (
    <>
      {isLoading && <LoadingIndicator />}
      {functions.length > 0 && <Separator />}
      {functions.map((fn) => (
        <button
          key={fn.name}
          className={MENU_BUTTON_CLASSES}
          onClick={() =>
            snap.setActiveDocsSection([API_DOCS_CATEGORIES.STORED_PROCEDURES, fn.name])
          }
        >
          {fn.name}
        </button>
      ))}
    </>
  )
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free