Home / Function/ SqlFunctionSection() — supabase Function Reference

SqlFunctionSection() — supabase Function Reference

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

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/Integrations/CronJobs/SqlFunctionSection.tsx lines 13–54

export const SqlFunctionSection = ({ form }: SqlFunctionSectionProps) => {
  const schema = form.watch('values.schema')

  return (
    <SheetSection className="flex flex-col gap-3 2xl:flex-row 2xl:[&>div]:w-full">
      <FormField_Shadcn_
        control={form.control}
        name="values.schema"
        render={({ field }) => (
          <FormItemLayout label="Schema" className="gap-1">
            <SchemaSelector
              size="small"
              className="w-56 2xl:w-full"
              selectedSchemaName={field.value}
              onSelectSchema={(name) => {
                field.onChange(name)
                // deselect the selected function when the schema is changed
                form.resetField('values.functionName')
              }}
            />
          </FormItemLayout>
        )}
      />

      <FormField_Shadcn_
        control={form.control}
        name="values.functionName"
        render={({ field }) => (
          <FormItemLayout label="Function name" className="gap-1">
            <FunctionSelector
              size="small"
              className="w-56 2xl:w-full"
              schema={schema}
              value={field.value}
              onChange={(name) => field.onChange(name)}
            />
          </FormItemLayout>
        )}
      />
    </SheetSection>
  )
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free