← atlas·database-functions

create-database-function

User navigates to the Database Functions surface, creates a custom Postgres function, reviews impacted tables, and saves. The journey covers function SQL editing, schema validation, and confirmation workflows across three cognitive models.

default path · what bare Studio does

  1. 01
    route/project/[ref]/database/functionsactionnavigate-sidebarhookuseSidebarNavigation
  2. 02
    route/project/[ref]/database/functionsactionload-functions-listuifunctions-list-rendered
  3. 03
    route/project/[ref]/database/functionsactioncreate-functionuifunction-editor-rendered
  4. 04
    route/project/[ref]/database/functionsactionwrite-function-sqluisql-editor-active
  5. 05
    route/project/[ref]/database/functionsactionvalidate-and-saveuifunction-saved

per-profile overrides · vehicle × route

Three vehicles, three routes

Connector · Battleship

Monica

sea route

Bring the team into the workflow.

deltas

  • Enter: sidebar-database-pin-top
  • prelude · TeamActivityPrelude
  • on save · TeamSaveAck

slot fillers wired

  • premain-prelude · TeamActivityPrelude
  • on savesave-confirmation · TeamSaveAckYour team can now review the function
  • on renderright-rail · CollabRail

cognitive justification

HSP flood + Connector → TeamActivityPrelude shows who created related functions. Right-rail shows team members who might be affected. Shared review reframes database functions as collaborative assets. Post-save confirmation affirms accessibility. No information loss through layout reflow.

Try Monica's route →

Explorer · Tractor

Nate

field route

Show me what I don't already know.

deltas

  • Enter: schema-map-tile
  • prelude · SchemaMap
  • destructive · AdvanceNoticeStrip 3000ms
  • chunk · 4

slot fillers wired

  • premain-prelude · SchemaMap
  • on rendertopbar-status · TopbarSchemaCount
  • pre-destructiveadvance-notice · AdvanceNoticeStrip3000ms

cognitive justification

ASD prediction-error + ADHD focus + DYS GLUT-drain → SchemaMap shows impacted tables visually. Chunking to 4 functions and zero motion reduce cognitive load. Advance-notice 3s before save prevents surprise. Literal language in warnings. Monospace SQL display aids dyslexia-friendly reading. MicroProgress confirms.

Try Nate's route →

Analyst · Airplane

Sara

air route

Numbers first. Then we talk.

deltas

  • Enter: command-palette-db-functions
  • prelude · KpiBand
  • on save · SaveLedger
  • chunk · 8

slot fillers wired

  • premain-prelude · KpiBand
  • on savesave-confirmation · SaveLedger✓ function created · {{tables}} table(s) affected
  • on rendertable-row-trailing · Sparkline

cognitive justification

Analyst (A 0.000) + DA-from-data → KpiBand shows parameter count and affected tables. Monospace SQL aids precision reading. Sparkline of creation history feeds reward loop. Typed-name confirmation (anxiety CORT +19) prevents accidental functions. SaveLedger shows impacted table count with millisecond precision.

Try Sara's route →