[{"data":1,"prerenderedAt":2397},["ShallowReactive",2],{"navigation":3,"\u002Fdatabase\u002Ftables":773,"\u002Fdatabase\u002Ftables-surround":2392},[4,28,63,85,103,112,269,355,453,485,506,542,576,594,647,669,693,721,747],{"title":5,"path":6,"stem":7,"children":8,"icon":27},"Getting Started","\u002Fgetting-started","01.getting-started\u002F01.index",[9,11,15,19,23],{"title":10,"path":6,"stem":7},"Introduction",{"title":12,"path":13,"stem":14},"Installation","\u002Fgetting-started\u002Finstallation","01.getting-started\u002F02.installation",{"title":16,"path":17,"stem":18},"Quickstart with AI","\u002Fgetting-started\u002Fquickstart-with-ai","01.getting-started\u002F03.quickstart-with-ai",{"title":20,"path":21,"stem":22},"Quickstart by Hand","\u002Fgetting-started\u002Fquickstart-by-hand","01.getting-started\u002F04.quickstart-by-hand",{"title":24,"path":25,"stem":26},"The Admin","\u002Fgetting-started\u002Fadmin-tour","01.getting-started\u002F05.admin-tour","i-lucide-rocket",{"title":29,"icon":30,"path":31,"stem":32,"children":33,"page":62},"Concepts","i-lucide-lightbulb","\u002Fconcepts","02.concepts",[34,38,42,46,50,54,58],{"title":35,"path":36,"stem":37},"PostgreSQL First","\u002Fconcepts\u002Fpostgresql-first","02.concepts\u002F01.postgresql-first",{"title":39,"path":40,"stem":41},"Resources","\u002Fconcepts\u002Fresources","02.concepts\u002F02.resources",{"title":43,"path":44,"stem":45},"Users and Roles","\u002Fconcepts\u002Fusers-and-roles","02.concepts\u002F03.users-and-roles",{"title":47,"path":48,"stem":49},"Permissions","\u002Fconcepts\u002Fpermissions","02.concepts\u002F04.permissions",{"title":51,"path":52,"stem":53},"Drafts and Publishing","\u002Fconcepts\u002Fdrafts-and-publishing","02.concepts\u002F05.drafts-and-publishing",{"title":55,"path":56,"stem":57},"Audit and Events","\u002Fconcepts\u002Faudit-and-events","02.concepts\u002F06.audit-and-events",{"title":59,"path":60,"stem":61},"Object Access","\u002Fconcepts\u002Fobject-access","02.concepts\u002F07.object-access",false,{"title":64,"icon":65,"path":66,"stem":67,"children":68,"page":62},"App","i-lucide-app-window","\u002Fapp","03.app",[69,73,77,81],{"title":70,"path":71,"stem":72},"The App","\u002Fapp\u002Foverview","03.app\u002F01.overview",{"title":74,"path":75,"stem":76},"DataViews","\u002Fapp\u002Fdataviews","03.app\u002F02.dataviews",{"title":78,"path":79,"stem":80},"Dashboards","\u002Fapp\u002Fdashboards","03.app\u002F03.dashboards",{"title":82,"path":83,"stem":84},"Arrange menu","\u002Fapp\u002Farrange-menu","03.app\u002F04.arrange-menu",{"title":86,"icon":87,"path":88,"stem":89,"children":90,"page":62},"Database","i-lucide-database","\u002Fdatabase","04.database",[91,95,99],{"title":92,"path":93,"stem":94},"Tables","\u002Fdatabase\u002Ftables","04.database\u002F01.tables",{"title":96,"path":97,"stem":98},"Views","\u002Fdatabase\u002Fviews","04.database\u002F02.views",{"title":100,"path":101,"stem":102},"Functions","\u002Fdatabase\u002Ffunctions","04.database\u002F03.functions",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":62},"SQL Console","i-lucide-square-terminal","\u002Fsql-console","05.sql-console",[109],{"title":104,"path":110,"stem":111},"\u002Fsql-console\u002Foverview","05.sql-console\u002F01.overview",{"title":74,"icon":113,"path":114,"stem":115,"children":116,"page":62},"i-lucide-layout-list","\u002Fdataviews","06.dataviews",[117,121,125,129,183,214],{"title":118,"path":119,"stem":120},"Overview","\u002Fdataviews\u002Foverview","06.dataviews\u002F01.overview",{"title":122,"path":123,"stem":124},"Creating a DataView","\u002Fdataviews\u002Fcreating","06.dataviews\u002F02.creating",{"title":126,"path":127,"stem":128},"Publishing","\u002Fdataviews\u002Fpublishing","06.dataviews\u002F03.publishing",{"title":130,"icon":131,"path":132,"stem":133,"children":134,"page":62},"Types","i-lucide-shapes","\u002Fdataviews\u002Ftypes","06.dataviews\u002F04.types",[135,139,143,147,151,155,159,163,167,171,175,179],{"title":136,"path":137,"stem":138},"Table","\u002Fdataviews\u002Ftypes\u002Ftable","06.dataviews\u002F04.types\u002F01.table",{"title":140,"path":141,"stem":142},"Cards","\u002Fdataviews\u002Ftypes\u002Fcards","06.dataviews\u002F04.types\u002F02.cards",{"title":144,"path":145,"stem":146},"Kanban","\u002Fdataviews\u002Ftypes\u002Fkanban","06.dataviews\u002F04.types\u002F03.kanban",{"title":148,"path":149,"stem":150},"Calendar","\u002Fdataviews\u002Ftypes\u002Fcalendar","06.dataviews\u002F04.types\u002F04.calendar",{"title":152,"path":153,"stem":154},"Gantt","\u002Fdataviews\u002Ftypes\u002Fgantt","06.dataviews\u002F04.types\u002F05.gantt",{"title":156,"path":157,"stem":158},"Map","\u002Fdataviews\u002Ftypes\u002Fmap","06.dataviews\u002F04.types\u002F06.map",{"title":160,"path":161,"stem":162},"Tree","\u002Fdataviews\u002Ftypes\u002Ftree","06.dataviews\u002F04.types\u002F07.tree",{"title":164,"path":165,"stem":166},"Form","\u002Fdataviews\u002Ftypes\u002Fform","06.dataviews\u002F04.types\u002F08.form",{"title":168,"path":169,"stem":170},"Master-detail","\u002Fdataviews\u002Ftypes\u002Fmaster-detail","06.dataviews\u002F04.types\u002F09.master-detail",{"title":172,"path":173,"stem":174},"Settings","\u002Fdataviews\u002Ftypes\u002Fsettings","06.dataviews\u002F04.types\u002F10.settings",{"title":176,"path":177,"stem":178},"Custom","\u002Fdataviews\u002Ftypes\u002Fcustom","06.dataviews\u002F04.types\u002F11.custom",{"title":180,"path":181,"stem":182},"External Frame","\u002Fdataviews\u002Ftypes\u002Fexternal-frame","06.dataviews\u002F04.types\u002F12.external-frame",{"title":172,"icon":184,"path":185,"stem":186,"children":187,"page":62},"i-lucide-settings-2","\u002Fdataviews\u002Fsettings","06.dataviews\u002F05.settings",[188,192,196,199,202,206,210],{"title":189,"path":190,"stem":191},"General","\u002Fdataviews\u002Fsettings\u002Fgeneral","06.dataviews\u002F05.settings\u002F01.general",{"title":193,"path":194,"stem":195},"Data","\u002Fdataviews\u002Fsettings\u002Fdata","06.dataviews\u002F05.settings\u002F02.data",{"title":96,"path":197,"stem":198},"\u002Fdataviews\u002Fsettings\u002Fviews","06.dataviews\u002F05.settings\u002F03.views",{"title":164,"path":200,"stem":201},"\u002Fdataviews\u002Fsettings\u002Fform","06.dataviews\u002F05.settings\u002F04.form",{"title":203,"path":204,"stem":205},"Actions","\u002Fdataviews\u002Fsettings\u002Factions","06.dataviews\u002F05.settings\u002F05.actions",{"title":207,"path":208,"stem":209},"Security","\u002Fdataviews\u002Fsettings\u002Fsecurity","06.dataviews\u002F05.settings\u002F06.security",{"title":211,"path":212,"stem":213},"Versions","\u002Fdataviews\u002Fsettings\u002Fversions","06.dataviews\u002F05.settings\u002F07.versions",{"title":215,"icon":216,"path":217,"stem":218,"children":219,"page":62},"Design Form","i-lucide-pencil-ruler","\u002Fdataviews\u002Fdesign-form","06.dataviews\u002F06.design-form",[220,223,257,261,265],{"title":118,"path":221,"stem":222},"\u002Fdataviews\u002Fdesign-form\u002Foverview","06.dataviews\u002F06.design-form\u002F01.overview",{"title":224,"icon":131,"path":225,"stem":226,"children":227,"page":62},"Widgets","\u002Fdataviews\u002Fdesign-form\u002Fwidgets","06.dataviews\u002F06.design-form\u002F02.widgets",[228,231,234,238,242,246,250,254],{"title":224,"path":229,"stem":230},"\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Foverview","06.dataviews\u002F06.design-form\u002F02.widgets\u002F01.overview",{"title":164,"path":232,"stem":233},"\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Fform","06.dataviews\u002F06.design-form\u002F02.widgets\u002F02.form",{"title":235,"path":236,"stem":237},"Inputs","\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Finputs","06.dataviews\u002F06.design-form\u002F02.widgets\u002F03.inputs",{"title":239,"path":240,"stem":241},"Display","\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Fdisplay","06.dataviews\u002F06.design-form\u002F02.widgets\u002F04.display",{"title":243,"path":244,"stem":245},"Embeds","\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Fembeds","06.dataviews\u002F06.design-form\u002F02.widgets\u002F05.embeds",{"title":247,"path":248,"stem":249},"Layout","\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Flayout","06.dataviews\u002F06.design-form\u002F02.widgets\u002F06.layout",{"title":251,"path":252,"stem":253},"Overlays","\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Foverlays","06.dataviews\u002F06.design-form\u002F02.widgets\u002F07.overlays",{"title":203,"path":255,"stem":256},"\u002Fdataviews\u002Fdesign-form\u002Fwidgets\u002Factions","06.dataviews\u002F06.design-form\u002F02.widgets\u002F08.actions",{"title":258,"path":259,"stem":260},"Variables","\u002Fdataviews\u002Fdesign-form\u002Fvariables","06.dataviews\u002F06.design-form\u002F03.variables",{"title":262,"path":263,"stem":264},"Code","\u002Fdataviews\u002Fdesign-form\u002Fcode","06.dataviews\u002F06.design-form\u002F04.code",{"title":266,"path":267,"stem":268},"Formulas","\u002Fdataviews\u002Fdesign-form\u002Fformulas","06.dataviews\u002F06.design-form\u002F05.formulas",{"title":78,"icon":270,"path":271,"stem":272,"children":273,"page":62},"i-lucide-layout-dashboard","\u002Fdashboards","07.dashboards",[274,277,281,285,332],{"title":118,"path":275,"stem":276},"\u002Fdashboards\u002Foverview","07.dashboards\u002F01.overview",{"title":278,"path":279,"stem":280},"Creating a Dashboard","\u002Fdashboards\u002Fcreating","07.dashboards\u002F02.creating",{"title":282,"path":283,"stem":284},"Editor","\u002Fdashboards\u002Feditor","07.dashboards\u002F03.editor",{"title":224,"icon":286,"path":287,"stem":288,"children":289,"page":62},"i-lucide-chart-bar","\u002Fdashboards\u002Fwidgets","07.dashboards\u002F04.widgets",[290,293,297,301,305,309,313,317,321,324,328],{"title":224,"path":291,"stem":292},"\u002Fdashboards\u002Fwidgets\u002Foverview","07.dashboards\u002F04.widgets\u002F01.overview",{"title":294,"path":295,"stem":296},"Editing a Widget","\u002Fdashboards\u002Fwidgets\u002Fediting-a-widget","07.dashboards\u002F04.widgets\u002F02.editing-a-widget",{"title":298,"path":299,"stem":300},"Indicators","\u002Fdashboards\u002Fwidgets\u002Findicators","07.dashboards\u002F04.widgets\u002F03.indicators",{"title":302,"path":303,"stem":304},"Comparison","\u002Fdashboards\u002Fwidgets\u002Fcomparison","07.dashboards\u002F04.widgets\u002F04.comparison",{"title":306,"path":307,"stem":308},"Trend","\u002Fdashboards\u002Fwidgets\u002Ftrend","07.dashboards\u002F04.widgets\u002F05.trend",{"title":310,"path":311,"stem":312},"Proportion","\u002Fdashboards\u002Fwidgets\u002Fproportion","07.dashboards\u002F04.widgets\u002F06.proportion",{"title":314,"path":315,"stem":316},"Distribution and Relation","\u002Fdashboards\u002Fwidgets\u002Fdistribution-and-relation","07.dashboards\u002F04.widgets\u002F07.distribution-and-relation",{"title":318,"path":319,"stem":320},"Maps","\u002Fdashboards\u002Fwidgets\u002Fmaps","07.dashboards\u002F04.widgets\u002F08.maps",{"title":92,"path":322,"stem":323},"\u002Fdashboards\u002Fwidgets\u002Ftables","07.dashboards\u002F04.widgets\u002F09.tables",{"title":325,"path":326,"stem":327},"Visualization and Insertion","\u002Fdashboards\u002Fwidgets\u002Fvisualization-and-insertion","07.dashboards\u002F04.widgets\u002F10.visualization-and-insertion",{"title":329,"path":330,"stem":331},"SQL Conventions","\u002Fdashboards\u002Fwidgets\u002Fsql-conventions","07.dashboards\u002F04.widgets\u002F11.sql-conventions",{"title":172,"icon":184,"path":333,"stem":334,"children":335,"page":62},"\u002Fdashboards\u002Fsettings","07.dashboards\u002F05.settings",[336,339,342,345,349,352],{"title":189,"path":337,"stem":338},"\u002Fdashboards\u002Fsettings\u002Fgeneral","07.dashboards\u002F05.settings\u002F01.general",{"title":258,"path":340,"stem":341},"\u002Fdashboards\u002Fsettings\u002Fvariables","07.dashboards\u002F05.settings\u002F02.variables",{"title":193,"path":343,"stem":344},"\u002Fdashboards\u002Fsettings\u002Fdata","07.dashboards\u002F05.settings\u002F03.data",{"title":346,"path":347,"stem":348},"Share","\u002Fdashboards\u002Fsettings\u002Fshare","07.dashboards\u002F05.settings\u002F04.share",{"title":207,"path":350,"stem":351},"\u002Fdashboards\u002Fsettings\u002Fsecurity","07.dashboards\u002F05.settings\u002F05.security",{"title":211,"path":353,"stem":354},"\u002Fdashboards\u002Fsettings\u002Fversions","07.dashboards\u002F05.settings\u002F06.versions",{"title":356,"icon":357,"path":358,"stem":359,"children":360,"page":62},"Workflows","i-lucide-workflow","\u002Fworkflows","08.workflows",[361,364,368,371,393,432],{"title":118,"path":362,"stem":363},"\u002Fworkflows\u002Foverview","08.workflows\u002F01.overview",{"title":365,"path":366,"stem":367},"Creating a Workflow","\u002Fworkflows\u002Fcreating","08.workflows\u002F02.creating",{"title":282,"path":369,"stem":370},"\u002Fworkflows\u002Feditor","08.workflows\u002F03.editor",{"title":372,"icon":373,"path":374,"stem":375,"children":376,"page":62},"Triggers","i-lucide-zap","\u002Fworkflows\u002Ftriggers","08.workflows\u002F04.triggers",[377,381,385,389],{"title":378,"path":379,"stem":380},"Manual","\u002Fworkflows\u002Ftriggers\u002Fmanual","08.workflows\u002F04.triggers\u002F01.manual",{"title":382,"path":383,"stem":384},"Database Event","\u002Fworkflows\u002Ftriggers\u002Fdatabase-event","08.workflows\u002F04.triggers\u002F02.database-event",{"title":386,"path":387,"stem":388},"Schedule","\u002Fworkflows\u002Ftriggers\u002Fschedule","08.workflows\u002F04.triggers\u002F03.schedule",{"title":390,"path":391,"stem":392},"Webhook","\u002Fworkflows\u002Ftriggers\u002Fwebhook","08.workflows\u002F04.triggers\u002F04.webhook",{"title":394,"icon":357,"path":395,"stem":396,"children":397,"page":62},"Steps","\u002Fworkflows\u002Fsteps","08.workflows\u002F05.steps",[398,401,405,408,412,416,420,424,428],{"title":193,"path":399,"stem":400},"\u002Fworkflows\u002Fsteps\u002Fdata","08.workflows\u002F05.steps\u002F01.data",{"title":402,"path":403,"stem":404},"Control","\u002Fworkflows\u002Fsteps\u002Fcontrol","08.workflows\u002F05.steps\u002F02.control",{"title":262,"path":406,"stem":407},"\u002Fworkflows\u002Fsteps\u002Fcode","08.workflows\u002F05.steps\u002F03.code",{"title":409,"path":410,"stem":411},"Integration","\u002Fworkflows\u002Fsteps\u002Fintegration","08.workflows\u002F05.steps\u002F04.integration",{"title":413,"path":414,"stem":415},"Communication","\u002Fworkflows\u002Fsteps\u002Fcommunication","08.workflows\u002F05.steps\u002F05.communication",{"title":417,"path":418,"stem":419},"Files","\u002Fworkflows\u002Fsteps\u002Ffiles","08.workflows\u002F05.steps\u002F06.files",{"title":421,"path":422,"stem":423},"Documents","\u002Fworkflows\u002Fsteps\u002Fdocuments","08.workflows\u002F05.steps\u002F07.documents",{"title":425,"path":426,"stem":427},"Composition","\u002Fworkflows\u002Fsteps\u002Fcomposition","08.workflows\u002F05.steps\u002F08.composition",{"title":429,"path":430,"stem":431},"Values","\u002Fworkflows\u002Fsteps\u002Fvalues","08.workflows\u002F05.steps\u002F09.values",{"title":172,"icon":184,"path":433,"stem":434,"children":435,"page":62},"\u002Fworkflows\u002Fsettings","08.workflows\u002F06.settings",[436,439,443,446,449],{"title":189,"path":437,"stem":438},"\u002Fworkflows\u002Fsettings\u002Fgeneral","08.workflows\u002F06.settings\u002F01.general",{"title":440,"path":441,"stem":442},"Trigger","\u002Fworkflows\u002Fsettings\u002Ftrigger","08.workflows\u002F06.settings\u002F02.trigger",{"title":207,"path":444,"stem":445},"\u002Fworkflows\u002Fsettings\u002Fsecurity","08.workflows\u002F06.settings\u002F03.security",{"title":211,"path":447,"stem":448},"\u002Fworkflows\u002Fsettings\u002Fversions","08.workflows\u002F06.settings\u002F04.versions",{"title":450,"path":451,"stem":452},"Runs","\u002Fworkflows\u002Fsettings\u002Fruns","08.workflows\u002F06.settings\u002F05.runs",{"title":417,"icon":454,"path":455,"stem":456,"children":457,"page":62},"i-lucide-files","\u002Ffiles","09.files",[458,461,465,469,473,477,481],{"title":118,"path":459,"stem":460},"\u002Ffiles\u002Foverview","09.files\u002F01.overview",{"title":462,"path":463,"stem":464},"Uploading","\u002Ffiles\u002Fuploading","09.files\u002F02.uploading",{"title":466,"path":467,"stem":468},"File Details","\u002Ffiles\u002Ffile-details","09.files\u002F03.file-details",{"title":470,"path":471,"stem":472},"Editing Files","\u002Ffiles\u002Fediting-files","09.files\u002F04.editing-files",{"title":474,"path":475,"stem":476},"Using Files in Tables","\u002Ffiles\u002Fusing-files-in-tables","09.files\u002F05.using-files-in-tables",{"title":478,"path":479,"stem":480},"Image Transformations","\u002Ffiles\u002Fimage-transformations","09.files\u002F06.image-transformations",{"title":482,"path":483,"stem":484},"Who Can See a File","\u002Ffiles\u002Fwho-can-see-a-file","09.files\u002F07.who-can-see-a-file",{"title":486,"icon":487,"path":488,"stem":489,"children":490,"page":62},"Templates","i-lucide-file-text","\u002Ftemplates","10.templates",[491,494,498,502],{"title":118,"path":492,"stem":493},"\u002Ftemplates\u002Foverview","10.templates\u002F01.overview",{"title":495,"path":496,"stem":497},"Emails","\u002Ftemplates\u002Femails","10.templates\u002F02.emails",{"title":499,"path":500,"stem":501},"PDF","\u002Ftemplates\u002Fpdf","10.templates\u002F03.pdf",{"title":503,"path":504,"stem":505},"System Emails","\u002Ftemplates\u002Fsystem-emails","10.templates\u002F04.system-emails",{"title":507,"icon":508,"path":509,"stem":510,"children":511,"page":62},"Users","i-lucide-users","\u002Fusers","11.users",[512,516,520,524,528],{"title":513,"path":514,"stem":515},"Managing Users","\u002Fusers\u002Fmanaging-users","11.users\u002F01.managing-users",{"title":517,"path":518,"stem":519},"A User's Page","\u002Fusers\u002Fa-users-page","11.users\u002F02.a-users-page",{"title":521,"path":522,"stem":523},"API Tokens","\u002Fusers\u002Fapi-tokens","11.users\u002F03.api-tokens",{"title":525,"path":526,"stem":527},"Sessions","\u002Fusers\u002Fsessions","11.users\u002F04.sessions",{"title":529,"icon":530,"path":531,"stem":532,"children":533,"page":62},"Insights","i-lucide-chart-line","\u002Fusers\u002Finsights","11.users\u002F05.insights",[534,538],{"title":535,"path":536,"stem":537},"Sign-ins","\u002Fusers\u002Finsights\u002Fsign-ins","11.users\u002F05.insights\u002F01.sign-ins",{"title":539,"path":540,"stem":541},"Activity","\u002Fusers\u002Finsights\u002Factivity","11.users\u002F05.insights\u002F02.activity",{"title":543,"icon":544,"path":545,"stem":546,"children":547,"page":62},"Roles","i-lucide-shield-check","\u002Froles","12.roles",[548,552,556,560,564,568,572],{"title":549,"path":550,"stem":551},"Creating a Role","\u002Froles\u002Fcreating-a-role","12.roles\u002F01.creating-a-role",{"title":553,"path":554,"stem":555},"Granting Permissions","\u002Froles\u002Fgranting-permissions","12.roles\u002F02.granting-permissions",{"title":557,"path":558,"stem":559},"Row Filters","\u002Froles\u002Frow-filters","12.roles\u002F03.row-filters",{"title":561,"path":562,"stem":563},"Payload Checks","\u002Froles\u002Fpayload-checks","12.roles\u002F04.payload-checks",{"title":565,"path":566,"stem":567},"Members","\u002Froles\u002Fmembers","12.roles\u002F05.members",{"title":569,"path":570,"stem":571},"Access Reviews","\u002Froles\u002Faccess-reviews","12.roles\u002F06.access-reviews",{"title":573,"path":574,"stem":575},"Delegated Administration","\u002Froles\u002Fdelegated-administration","12.roles\u002F07.delegated-administration",{"title":577,"icon":578,"path":579,"stem":580,"children":581,"page":62},"Logs","i-lucide-scroll-text","\u002Flogs","13.logs",[582,586,590],{"title":583,"path":584,"stem":585},"Audit Log","\u002Flogs\u002Faudit-log","13.logs\u002F01.audit-log",{"title":587,"path":588,"stem":589},"An Entry","\u002Flogs\u002Fan-entry","13.logs\u002F02.an-entry",{"title":591,"path":592,"stem":593},"Where Else It Shows","\u002Flogs\u002Fwhere-else-it-shows","13.logs\u002F03.where-else-it-shows",{"title":595,"icon":596,"path":597,"stem":598,"children":599,"page":62},"Data API","i-lucide-braces","\u002Fdata-api","14.data-api",[600,603,607,611,615,619,623,627,631,635,639,643],{"title":118,"path":601,"stem":602},"\u002Fdata-api\u002Foverview","14.data-api\u002F01.overview",{"title":604,"path":605,"stem":606},"Authentication","\u002Fdata-api\u002Fauthentication","14.data-api\u002F02.authentication",{"title":608,"path":609,"stem":610},"Reading","\u002Fdata-api\u002Freading","14.data-api\u002F03.reading",{"title":612,"path":613,"stem":614},"Filtering","\u002Fdata-api\u002Ffiltering","14.data-api\u002F04.filtering",{"title":616,"path":617,"stem":618},"Aggregating","\u002Fdata-api\u002Faggregating","14.data-api\u002F05.aggregating",{"title":620,"path":621,"stem":622},"Writing","\u002Fdata-api\u002Fwriting","14.data-api\u002F06.writing",{"title":624,"path":625,"stem":626},"Nested Writes","\u002Fdata-api\u002Fnested-writes","14.data-api\u002F07.nested-writes",{"title":628,"path":629,"stem":630},"Transactions","\u002Fdata-api\u002Ftransactions","14.data-api\u002F08.transactions",{"title":632,"path":633,"stem":634},"Calling Functions","\u002Fdata-api\u002Fcalling-functions","14.data-api\u002F09.calling-functions",{"title":636,"path":637,"stem":638},"OpenAPI","\u002Fdata-api\u002Fopenapi","14.data-api\u002F10.openapi",{"title":640,"path":641,"stem":642},"Routes","\u002Fdata-api\u002Froutes","14.data-api\u002F11.routes",{"title":644,"path":645,"stem":646},"A client, end to end","\u002Fdata-api\u002Fa-client","14.data-api\u002F12.a-client",{"title":172,"icon":648,"path":649,"stem":650,"children":651,"page":62},"i-lucide-settings","\u002Fsettings","15.settings",[652,655,659,662,665],{"title":189,"path":653,"stem":654},"\u002Fsettings\u002Fgeneral","15.settings\u002F01.general",{"title":656,"path":657,"stem":658},"Access","\u002Fsettings\u002Faccess","15.settings\u002F02.access",{"title":207,"path":660,"stem":661},"\u002Fsettings\u002Fsecurity","15.settings\u002F03.security",{"title":595,"path":663,"stem":664},"\u002Fsettings\u002Fdata-api","15.settings\u002F04.data-api",{"title":666,"path":667,"stem":668},"Features","\u002Fsettings\u002Ffeatures","15.settings\u002F05.features",{"title":670,"icon":671,"path":672,"stem":673,"children":674,"page":62},"User Profile","i-lucide-circle-user","\u002Fuser-profile","16.user-profile",[675,679,682,686,690],{"title":676,"path":677,"stem":678},"My Account","\u002Fuser-profile\u002Fmy-account","16.user-profile\u002F01.my-account",{"title":525,"path":680,"stem":681},"\u002Fuser-profile\u002Fsessions","16.user-profile\u002F02.sessions",{"title":683,"path":684,"stem":685},"Tokens","\u002Fuser-profile\u002Ftokens","16.user-profile\u002F03.tokens",{"title":687,"path":688,"stem":689},"Preferences","\u002Fuser-profile\u002Fpreferences","16.user-profile\u002F04.preferences",{"title":539,"path":691,"stem":692},"\u002Fuser-profile\u002Factivity","16.user-profile\u002F05.activity",{"title":694,"icon":695,"path":696,"stem":697,"children":698,"page":62},"AI Agents","i-lucide-bot","\u002Fai-agents","17.ai-agents",[699,702,705,709,713,717],{"title":118,"path":700,"stem":701},"\u002Fai-agents\u002Foverview","17.ai-agents\u002F01.overview",{"title":683,"path":703,"stem":704},"\u002Fai-agents\u002Ftokens","17.ai-agents\u002F02.tokens",{"title":706,"path":707,"stem":708},"MCP Server","\u002Fai-agents\u002Fmcp-server","17.ai-agents\u002F03.mcp-server",{"title":710,"path":711,"stem":712},"Recipes","\u002Fai-agents\u002Frecipes","17.ai-agents\u002F04.recipes",{"title":714,"path":715,"stem":716},"Tools","\u002Fai-agents\u002Ftools","17.ai-agents\u002F05.tools",{"title":718,"path":719,"stem":720},"llms.txt","\u002Fai-agents\u002Fllms-txt","17.ai-agents\u002F06.llms-txt",{"title":722,"icon":723,"path":724,"stem":725,"children":726,"page":62},"Operations","i-lucide-server","\u002Foperations","18.operations",[727,731,735,739,743],{"title":728,"path":729,"stem":730},"Deployment","\u002Foperations\u002Fdeployment","18.operations\u002F01.deployment",{"title":732,"path":733,"stem":734},"PostgreSQL","\u002Foperations\u002Fpostgresql","18.operations\u002F02.postgresql",{"title":736,"path":737,"stem":738},"Public URL, Proxy and CORS","\u002Foperations\u002Fpublic-url-proxy-cors","18.operations\u002F03.public-url-proxy-cors",{"title":740,"path":741,"stem":742},"Backup and Restore","\u002Foperations\u002Fbackup-restore","18.operations\u002F04.backup-restore",{"title":744,"path":745,"stem":746},"Upgrading","\u002Foperations\u002Fupgrading","18.operations\u002F05.upgrading",{"title":748,"icon":749,"path":750,"stem":751,"children":752,"page":62},"Reference","i-lucide-library","\u002Freference","19.reference",[753,757,761,765,769],{"title":754,"path":755,"stem":756},"Query Language","\u002Freference\u002Fquery-language","19.reference\u002F01.query-language",{"title":758,"path":759,"stem":760},"Errors","\u002Freference\u002Ferrors","19.reference\u002F02.errors",{"title":762,"path":763,"stem":764},"Admin API","\u002Freference\u002Fadmin-api","19.reference\u002F03.admin-api",{"title":766,"path":767,"stem":768},"Authentication API","\u002Freference\u002Fauth-api","19.reference\u002F04.auth-api",{"title":770,"path":771,"stem":772},"Environment Variables","\u002Freference\u002Fenvironment","19.reference\u002F05.environment",{"id":774,"title":92,"admin":775,"body":776,"description":2385,"extension":2386,"links":2387,"meta":2388,"navigation":2389,"path":93,"seo":2390,"stem":94,"__hash__":2391},"docs\u002F04.database\u002F01.tables.md","Database › a schema › Tables › New table · a table › Columns, Indexes, Constraints, Row display, Suggest presentation",{"type":777,"value":778,"toc":2356},"minimark",[779,799,813,842,847,899,903,913,927,936,941,945,955,1077,1083,1087,1098,1102,1106,1112,1141,1148,1155,1247,1252,1263,1267,1285,1289,1304,1308,1327,1338,1342,1345,1352,1371,1456,1564,1570,1588,1592,1639,1643,1652,1658,1663,1667,1673,1709,1715,1718,1724,1728,1735,1766,1769,1773,1782,1786,1797,1810,1813,1817,1934,1955,1959,1962,1976,1980,1983,2061,2068,2166,2173,2176,2180,2189,2226,2233,2237,2248,2252,2266,2270,2304,2311,2315,2318,2322,2352],[780,781,782,785,786,790,791,794,795,798],"p",{},[783,784,86],"strong",{}," creates and changes the structure of your tables: tables, columns, primary keys, ",[787,788,789],"code",{},"UNIQUE",", foreign keys, ",[787,792,793],{},"CHECK"," constraints and indexes. Everything it does is plain PostgreSQL DDL. You can do the same with the SQL Console or ",[787,796,797],{},"psql",", and TotalBase picks it up either way.",[780,800,801,802,805,806,809,810,812],{},"TotalBase doesn't try to replace a full database tool. ",[803,804,96],"a",{"href":97},", ",[803,807,808],{"href":101},"functions",", triggers, types and composite foreign keys are written in SQL, in the ",[803,811,104],{"href":110},".",[814,815,816],"tip",{},[780,817,818,821,822,826,827,830,831,833,834,837,838,812],{},[783,819,820],{},"With an AI agent."," Ask ",[823,824,825],"em",{},"\"Create a work_orders table with a site, a priority (low to urgent), a status, and a rule that a completed order has a resolution\"",". The agent calls ",[787,828,829],{},"create_table"," with the columns, foreign keys, ",[787,832,793],{}," constraints and exposure in one transaction, then ",[787,835,836],{},"set_column_presentation"," for labels and colors. See ",[803,839,841],{"href":840},"\u002Fai-agents\u002Frecipes#a-table-with-its-rules","Recipes › A table with its rules",[843,844,846],"h2",{"id":845},"how-changes-are-made","How changes are made",[848,849,850,868,874,880,893],"ul",{},[851,852,853,856,857,860,861,863,864,867],"li",{},[783,854,855],{},"You describe, TotalBase writes the SQL."," The admin sends what you chose (a column, its type, its constraints) and the server builds the statement. The only free-form parts are a column's ",[787,858,859],{},"DEFAULT",", a ",[787,862,793],{}," expression and a partial index's ",[787,865,866],{},"WHERE",". These are checked so they can't contain a second statement or a command.",[851,869,870,873],{},[783,871,872],{},"All or nothing."," A change that takes several statements runs them in one transaction: a table with its foreign keys, a column with its presentation, or a whole batch of edits.",[851,875,876,879],{},[783,877,878],{},"Preview first."," Before saving, the table editor shows you the exact statements it will run.",[851,881,882,885,886,888,889,892],{},[783,883,884],{},"PostgreSQL decides."," Adding ",[787,887,789],{}," to a column that already has duplicates fails with PostgreSQL's error, and so does adding ",[787,890,891],{},"NOT NULL"," without a default to a table that has rows. TotalBase reports it and leaves the table as it was.",[851,894,895,898],{},[783,896,897],{},"Audited."," Every change is recorded in the audit log with the statements that ran.",[843,900,902],{"id":901},"create-a-table","Create a table",[780,904,905,906,908,909,912],{},"In ",[783,907,86],{},", choose the schema and click ",[783,910,911],{},"New table",". A table needs a name and a primary key. Add the rest of its columns on its page.",[780,914,915,916,860,919,922,923,926],{},"The primary key is ",[787,917,918],{},"id",[787,920,921],{},"uuid"," that PostgreSQL generates (",[787,924,925],{},"gen_random_uuid()",") by default. You can choose Serial, BigSerial, Integer or Varchar instead. The Data API, DataViews and forms address rows by a single-column key, so give every table one.",[780,928,929,930,933,934,812],{},"A new table is a ",[783,931,932],{},"hidden"," resource. Expose it and grant permissions before anyone else can use it. See ",[803,935,39],{"href":40},[937,938],"screenshot",{"caption":939,"id":940},"New table: name, schema and primary key of work_orders.","modeling-new-table",[843,942,944],{"id":943},"add-a-column","Add a column",[780,946,947,950,951,954],{},[783,948,949],{},"Add column",", on a table's Columns tab, starts from what the column ",[823,952,953],{},"is"," rather than from a PostgreSQL type. Choose a control, then configure it:",[956,957,958,971],"table",{},[959,960,961],"thead",{},[962,963,964,968],"tr",{},[965,966,967],"th",{},"You choose",[965,969,970],{},"PostgreSQL gets",[972,973,974,989,1003,1016,1030,1040,1053,1063],"tbody",{},[962,975,976,980],{},[977,978,979],"td",{},"Email",[977,981,982,985,986,988],{},[787,983,984],{},"text"," with a ",[787,987,793],{}," on the email shape",[962,990,991,994],{},[977,992,993],{},"Number with − and + (min 0, max 10)",[977,995,996,999,1000],{},[787,997,998],{},"integer"," with ",[787,1001,1002],{},"CHECK (col BETWEEN 0 AND 10)",[962,1004,1005,1008],{},[977,1006,1007],{},"Choice: Low, Normal, High, Urgent",[977,1009,1010,999,1012,1015],{},[787,1011,984],{},[787,1013,1014],{},"CHECK (priority IN ('LOW','NORMAL','HIGH','URGENT'))",", plus each value's label and color",[962,1017,1018,1024],{},[977,1019,1020,1021],{},"Relation to ",[787,1022,1023],{},"sites",[977,1025,1026,1027],{},"the key's type with a ",[787,1028,1029],{},"FOREIGN KEY",[962,1031,1032,1035],{},[977,1033,1034],{},"Photo, File, Signature",[977,1036,1037,1039],{},[787,1038,921],{}," with a foreign key to TotalBase's files table",[962,1041,1042,1045],{},[977,1043,1044],{},"Rating (1-5)",[977,1046,1047,999,1050],{},[787,1048,1049],{},"smallint",[787,1051,1052],{},"CHECK (col BETWEEN 1 AND 5)",[962,1054,1055,1058],{},[977,1056,1057],{},"Password",[977,1059,1060,1062],{},[787,1061,984],{},", hashed on every write and never returned",[962,1064,1065,1071],{},[977,1066,1067,1068],{},"UID, generated from ",[787,1069,1070],{},"name",[977,1072,1073,1076],{},[787,1074,1075],{},"text UNIQUE",", filled by a trigger with a URL-safe version of the name",[780,1078,1079,1080,1082],{},"The rules go into the database as ",[787,1081,793],{}," constraints and foreign keys, so they apply to every writer, not just the admin. The control you chose is remembered as the column's presentation, which every form and grid uses from then on.",[937,1084],{"caption":1085,"id":1086},"Add column: choosing the Choice control for work_orders.priority.","modeling-add-column",[780,1088,1089,1090,1093,1094,1097],{},"Columns you add outside TotalBase get a control picked from their type and constraints. A foreign key to ",[787,1091,1092],{},"files"," becomes a file upload, a ",[787,1095,1096],{},"CHECK ... IN (...)"," list becomes a select, and so on. You can change it on the Columns tab.",[843,1099,1101],{"id":1100},"constraints","Constraints",[1103,1104,793],"h3",{"id":1105},"check",[780,1107,1108,1109,1111],{},"A ",[787,1110,793],{}," constraint is a rule every row must satisfy. In the table's Constraints tab, build one from conditions or type the expression:",[1113,1114,1119],"pre",{"className":1115,"code":1116,"language":1117,"meta":1118,"style":1118},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","ends_on > starts_on                     -- contracts\ndiscount_pct BETWEEN 0 AND 100          -- quote_items\nquantity >= 0                           -- stock\n","sql","",[787,1120,1121,1129,1135],{"__ignoreMap":1118},[1122,1123,1126],"span",{"class":1124,"line":1125},"line",1,[1122,1127,1128],{},"ends_on > starts_on                     -- contracts\n",[1122,1130,1132],{"class":1124,"line":1131},2,[1122,1133,1134],{},"discount_pct BETWEEN 0 AND 100          -- quote_items\n",[1122,1136,1138],{"class":1124,"line":1137},3,[1122,1139,1140],{},"quantity >= 0                           -- stock\n",[780,1142,1143,1144,1147],{},"TotalBase wraps the expression in ",[787,1145,1146],{},"ALTER TABLE ... ADD CONSTRAINT",". It never accepts a complete statement.",[780,1149,1150,1151,1154],{},"Give each constraint a ",[783,1152,1153],{},"message",". It is stored as the constraint's PostgreSQL comment, and when a write breaks the rule, the API returns that message instead of PostgreSQL's generic text:",[1113,1156,1160],{"className":1157,"code":1158,"language":1159,"meta":1118,"style":1118},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{ \"errors\": [{ \"source\": \"POSTGRESQL\", \"code\": \"CHECK_VIOLATION\",\n               \"message\": \"A contract must end after it starts.\" }] }\n","json",[787,1161,1162,1223],{"__ignoreMap":1118},[1122,1163,1164,1168,1171,1175,1178,1181,1184,1186,1190,1192,1194,1196,1200,1202,1205,1207,1209,1211,1213,1215,1218,1220],{"class":1124,"line":1125},[1122,1165,1167],{"class":1166},"sMK4o","{",[1122,1169,1170],{"class":1166}," \"",[1122,1172,1174],{"class":1173},"spNyl","errors",[1122,1176,1177],{"class":1166},"\"",[1122,1179,1180],{"class":1166},":",[1122,1182,1183],{"class":1166}," [{",[1122,1185,1170],{"class":1166},[1122,1187,1189],{"class":1188},"sBMFI","source",[1122,1191,1177],{"class":1166},[1122,1193,1180],{"class":1166},[1122,1195,1170],{"class":1166},[1122,1197,1199],{"class":1198},"sfazB","POSTGRESQL",[1122,1201,1177],{"class":1166},[1122,1203,1204],{"class":1166},",",[1122,1206,1170],{"class":1166},[1122,1208,787],{"class":1188},[1122,1210,1177],{"class":1166},[1122,1212,1180],{"class":1166},[1122,1214,1170],{"class":1166},[1122,1216,1217],{"class":1198},"CHECK_VIOLATION",[1122,1219,1177],{"class":1166},[1122,1221,1222],{"class":1166},",\n",[1122,1224,1225,1228,1230,1232,1234,1236,1239,1241,1244],{"class":1124,"line":1131},[1122,1226,1227],{"class":1166},"               \"",[1122,1229,1153],{"class":1188},[1122,1231,1177],{"class":1166},[1122,1233,1180],{"class":1166},[1122,1235,1170],{"class":1166},[1122,1237,1238],{"class":1198},"A contract must end after it starts.",[1122,1240,1177],{"class":1166},[1122,1242,1243],{"class":1166}," }]",[1122,1245,1246],{"class":1166}," }\n",[780,1248,1249,1251],{},[787,1250,789],{}," and foreign key constraints take a message the same way.",[814,1253,1254],{},[780,1255,1108,1256,1258,1259,1262],{},[787,1257,793],{}," applies to everyone. When a rule should only apply to some roles (for example, Sales may give at most 20% discount but a Manager may give more), use a ",[803,1260,1261],{"href":562},"payload check"," instead.",[1103,1264,1266],{"id":1265},"unique-and-primary-keys","UNIQUE and primary keys",[780,1268,1269,1270,1272,1273,1276,1277,1280,1281,1284],{},"Add ",[787,1271,789],{}," on one or more columns, such as ",[787,1274,1275],{},"parts.sku",", or ",[787,1278,1279],{},"(part, warehouse)"," on ",[787,1282,1283],{},"stock",". Replacing a primary key drops the old one and adds the new one in one transaction. If PostgreSQL refuses the new key (because of nulls or duplicates), the old key stays.",[843,1286,1288],{"id":1287},"relations","Relations",[780,1290,1291,1292,1295,1296,1299,1300,1303],{},"A relation in TotalBase is a PostgreSQL ",[783,1293,1294],{},"foreign key",", nothing more. There's no relation metadata to configure. If ",[787,1297,1298],{},"work_orders.site"," references ",[787,1301,1302],{},"sites.id",", then from a work order you can reach its site, and from the site its customer.",[1103,1305,1307],{"id":1306},"foreign-keys","Foreign keys",[780,1309,1310,1311,1314,1315,1318,1319,1322,1323,1326],{},"A foreign key points a column at another table's primary key or unique column, with its ",[787,1312,1313],{},"ON DELETE"," and ",[787,1316,1317],{},"ON UPDATE"," actions. Create one with ",[783,1320,1321],{},"Add column › Relation",", which adds the column and its key together, or add it to an existing column from the table's Constraints. If existing rows point at rows that don't exist, PostgreSQL refuses it (",[787,1324,1325],{},"409 FOREIGN_KEY_VIOLATION",").",[780,1328,1329,1330,1333,1334,1337],{},"A foreign key from a table to itself (a customer's ",[787,1331,1332],{},"parent",") can also get a ",[783,1335,1336],{},"cycle guard",", a trigger that stops a row from being placed under itself or one of its descendants.",[1103,1339,1341],{"id":1340},"dotted-paths","Dotted paths",[780,1343,1344],{},"The foreign key column's name is the path. On its own it's the raw value. Followed by a dot, it reaches into the related row:",[1113,1346,1350],{"className":1347,"code":1349,"language":984,"meta":1118},[1348],"language-text","site                    the raw foreign key value (a uuid)\nsite.name               the site's name\nsite.customer.name      the site's customer's name\n",[787,1351,1349],{"__ignoreMap":1118},[780,1353,1354,1355,805,1358,805,1361,805,1364,805,1367,1370],{},"Paths work anywhere a column does: in ",[787,1356,1357],{},"fields",[787,1359,1360],{},"where",[787,1362,1363],{},"search",[787,1365,1366],{},"order_by",[787,1368,1369],{},"group_by"," and aggregates.",[1113,1372,1376],{"className":1373,"code":1374,"language":1375,"meta":1118,"style":1118},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -s -G http:\u002F\u002Flocalhost:3050\u002Fapi\u002Fpublic\u002Ftable\u002Fwork_orders \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  --data-urlencode 'fields=number,status,site.name,site.customer.name' \\\n  --data-urlencode 'where[site.customer.name][_ilike]=%Mercado%' \\\n  --data-urlencode 'order_by=site.name'\n","bash",[787,1377,1378,1396,1413,1429,1443],{"__ignoreMap":1118},[1122,1379,1380,1383,1386,1389,1392],{"class":1124,"line":1125},[1122,1381,1382],{"class":1188},"curl",[1122,1384,1385],{"class":1198}," -s",[1122,1387,1388],{"class":1198}," -G",[1122,1390,1391],{"class":1198}," http:\u002F\u002Flocalhost:3050\u002Fapi\u002Fpublic\u002Ftable\u002Fwork_orders",[1122,1393,1395],{"class":1394},"sTEyZ"," \\\n",[1122,1397,1398,1401,1403,1406,1409,1411],{"class":1124,"line":1131},[1122,1399,1400],{"class":1198},"  -H",[1122,1402,1170],{"class":1166},[1122,1404,1405],{"class":1198},"Authorization: Bearer ",[1122,1407,1408],{"class":1394},"$TOKEN",[1122,1410,1177],{"class":1166},[1122,1412,1395],{"class":1394},[1122,1414,1415,1418,1421,1424,1427],{"class":1124,"line":1137},[1122,1416,1417],{"class":1198},"  --data-urlencode",[1122,1419,1420],{"class":1166}," '",[1122,1422,1423],{"class":1198},"fields=number,status,site.name,site.customer.name",[1122,1425,1426],{"class":1166},"'",[1122,1428,1395],{"class":1394},[1122,1430,1432,1434,1436,1439,1441],{"class":1124,"line":1431},4,[1122,1433,1417],{"class":1198},[1122,1435,1420],{"class":1166},[1122,1437,1438],{"class":1198},"where[site.customer.name][_ilike]=%Mercado%",[1122,1440,1426],{"class":1166},[1122,1442,1395],{"class":1394},[1122,1444,1446,1448,1450,1453],{"class":1124,"line":1445},5,[1122,1447,1417],{"class":1198},[1122,1449,1420],{"class":1166},[1122,1451,1452],{"class":1198},"order_by=site.name",[1122,1454,1455],{"class":1166},"'\n",[1113,1457,1459],{"className":1157,"code":1458,"language":1159,"meta":1118,"style":1118},"{ \"data\": [\n  { \"number\": \"WO-000412\", \"status\": \"ASSIGNED\",\n    \"site.name\": \"Depósito Central\", \"site.customer.name\": \"Mercado del Norte S.A.\" }\n] }\n",[787,1460,1461,1477,1518,1557],{"__ignoreMap":1118},[1122,1462,1463,1465,1467,1470,1472,1474],{"class":1124,"line":1125},[1122,1464,1167],{"class":1166},[1122,1466,1170],{"class":1166},[1122,1468,1469],{"class":1173},"data",[1122,1471,1177],{"class":1166},[1122,1473,1180],{"class":1166},[1122,1475,1476],{"class":1166}," [\n",[1122,1478,1479,1482,1484,1487,1489,1491,1493,1496,1498,1500,1502,1505,1507,1509,1511,1514,1516],{"class":1124,"line":1131},[1122,1480,1481],{"class":1166},"  {",[1122,1483,1170],{"class":1166},[1122,1485,1486],{"class":1188},"number",[1122,1488,1177],{"class":1166},[1122,1490,1180],{"class":1166},[1122,1492,1170],{"class":1166},[1122,1494,1495],{"class":1198},"WO-000412",[1122,1497,1177],{"class":1166},[1122,1499,1204],{"class":1166},[1122,1501,1170],{"class":1166},[1122,1503,1504],{"class":1188},"status",[1122,1506,1177],{"class":1166},[1122,1508,1180],{"class":1166},[1122,1510,1170],{"class":1166},[1122,1512,1513],{"class":1198},"ASSIGNED",[1122,1515,1177],{"class":1166},[1122,1517,1222],{"class":1166},[1122,1519,1520,1523,1526,1528,1530,1532,1535,1537,1539,1541,1544,1546,1548,1550,1553,1555],{"class":1124,"line":1137},[1122,1521,1522],{"class":1166},"    \"",[1122,1524,1525],{"class":1188},"site.name",[1122,1527,1177],{"class":1166},[1122,1529,1180],{"class":1166},[1122,1531,1170],{"class":1166},[1122,1533,1534],{"class":1198},"Depósito Central",[1122,1536,1177],{"class":1166},[1122,1538,1204],{"class":1166},[1122,1540,1170],{"class":1166},[1122,1542,1543],{"class":1188},"site.customer.name",[1122,1545,1177],{"class":1166},[1122,1547,1180],{"class":1166},[1122,1549,1170],{"class":1166},[1122,1551,1552],{"class":1198},"Mercado del Norte S.A.",[1122,1554,1177],{"class":1166},[1122,1556,1246],{"class":1166},[1122,1558,1559,1562],{"class":1124,"line":1431},[1122,1560,1561],{"class":1166},"]",[1122,1563,1246],{"class":1166},[780,1565,1566,1567,812],{},"Rename the output with aliases: ",[787,1568,1569],{},"fields[site.customer.name]=Customer",[780,1571,1572,1573,1576,1577,1580,1581,1584,1585,1326],{},"Each step is a ",[787,1574,1575],{},"LEFT JOIN"," on the foreign key, so a work order without a technician still appears, with ",[787,1578,1579],{},"technician.name"," as ",[787,1582,1583],{},"null",". Paths can go three steps deep by default (",[787,1586,1587],{},"api.max_relation_depth",[1103,1589,1591],{"id":1590},"what-a-path-may-reach","What a path may reach",[848,1593,1594,1607,1630],{},[851,1595,1596,1599,1600,1603,1604,812],{},[783,1597,1598],{},"The target must be exposed for reading."," A foreign key into a table that is hidden, or doesn't have ",[787,1601,1602],{},"GET",", returns ",[787,1605,1606],{},"400 INVALID_RELATION",[851,1608,1609,1612,1613,1616,1617,1619,1620,1622,1623,1626,1627,812],{},[783,1610,1611],{},"The path must be granted."," Permissions decide each path on the resource being read. Dispatchers who read ",[787,1614,1615],{},"work_orders"," see ",[787,1618,1543],{}," only if that path is in their ",[787,1621,1615],{}," grant. A grant on ",[787,1624,1625],{},"customers"," doesn't give it. See ",[803,1628,47],{"href":1629},"\u002Fconcepts\u002Fpermissions#fields",[851,1631,1632,1635,1636,1638],{},[783,1633,1634],{},"The target's own row filter doesn't apply."," A dispatcher reading their branch's work orders sees each order's customer name, even if they couldn't list ",[787,1637,1625],{}," directly. What they can see is limited to the granted columns, on rows reachable from orders they may read.",[1103,1640,1642],{"id":1641},"one-direction-only","One direction only",[780,1644,1645,1646,1648,1649,1180],{},"A path follows a foreign key from the table that holds it toward the table it points at: from an order to its site, never from a site to its orders. To read a site's orders, read ",[787,1647,1615],{}," filtered by ",[787,1650,1651],{},"site",[1113,1653,1656],{"className":1654,"code":1655,"language":984,"meta":1118},[1348],"GET \u002Fapi\u002Fpublic\u002Ftable\u002Fwork_orders?where[site][_eq]=\u003Csite id>\n",[787,1657,1655],{"__ignoreMap":1118},[780,1659,1660,1661,812],{},"In DataViews, a record form shows the reverse direction as a panel: a site's form with a panel of its work orders. See ",[803,1662,224],{"href":229},[1103,1664,1666],{"id":1665},"many-to-many-junction-tables","Many-to-many: junction tables",[780,1668,1669,1672],{},[783,1670,1671],{},"New table › Junction table"," creates a many-to-many relation as an ordinary table. Acme links projects to the technicians who work on them. Pick the two tables and TotalBase creates:",[1113,1674,1676],{"className":1115,"code":1675,"language":1117,"meta":1118,"style":1118},"CREATE TABLE public.projects_technicians (\n  id         uuid PRIMARY KEY DEFAULT gen_random_uuid(),\n  project    uuid NOT NULL REFERENCES public.projects (id) ON DELETE CASCADE,\n  technician uuid NOT NULL REFERENCES public.technicians (id) ON DELETE CASCADE,\n  UNIQUE (project, technician)\n);\n",[787,1677,1678,1683,1688,1693,1698,1703],{"__ignoreMap":1118},[1122,1679,1680],{"class":1124,"line":1125},[1122,1681,1682],{},"CREATE TABLE public.projects_technicians (\n",[1122,1684,1685],{"class":1124,"line":1131},[1122,1686,1687],{},"  id         uuid PRIMARY KEY DEFAULT gen_random_uuid(),\n",[1122,1689,1690],{"class":1124,"line":1137},[1122,1691,1692],{},"  project    uuid NOT NULL REFERENCES public.projects (id) ON DELETE CASCADE,\n",[1122,1694,1695],{"class":1124,"line":1431},[1122,1696,1697],{},"  technician uuid NOT NULL REFERENCES public.technicians (id) ON DELETE CASCADE,\n",[1122,1699,1700],{"class":1124,"line":1445},[1122,1701,1702],{},"  UNIQUE (project, technician)\n",[1122,1704,1706],{"class":1124,"line":1705},6,[1122,1707,1708],{},");\n",[780,1710,1711,1712,1714],{},"The ",[787,1713,789],{}," constraint means a technician joins a project only once, and PostgreSQL enforces it.",[780,1716,1717],{},"To read it, read the junction table and follow both paths:",[1113,1719,1722],{"className":1720,"code":1721,"language":984,"meta":1118},[1348],"GET \u002Fapi\u002Fpublic\u002Ftable\u002Fprojects_technicians?fields=project.name,technician.user.name\n",[787,1723,1721],{"__ignoreMap":1118},[1103,1725,1727],{"id":1726},"how-a-related-row-is-shown","How a related row is shown",[780,1729,1730,1731,1734],{},"Wherever a foreign key appears on screen (a grid column, a select in a form, a kanban's lane), TotalBase shows the related row instead of its key. How is the table's ",[783,1732,1733],{},"Row display",", a button on its Columns tab:",[848,1736,1737,1756],{},[851,1738,1739,1742,1743,1745,1746,805,1748,1751,1752,1755],{},[783,1740,1741],{},"Show",": one column, such as a site's ",[787,1744,1070],{},". By default, a column called ",[787,1747,1070],{},[787,1749,1750],{},"label"," or ",[787,1753,1754],{},"title",", else the first text column.",[851,1757,1758,1761,1762,1765],{},[783,1759,1760],{},"Template",": several columns at once, such as ",[787,1763,1764],{},"{{plate}} ({{make}} {{model}})"," for a vehicle. It sorts by the first one.",[780,1767,1768],{},"You set it once per table, and every DataView column pointing at the table follows it. A template only names the table's own columns.",[1103,1770,1772],{"id":1771},"creating-related-rows-together","Creating related rows together",[780,1774,1108,1775,1778,1779,812],{},[787,1776,1777],{},"POST"," can create a row together with its children, such as a quote with its items, in one transaction. See ",[803,1780,1781],{"href":625},"Nested writes",[843,1783,1785],{"id":1784},"column-presentation","Column presentation",[780,1787,1788,1789,1792,1793,1796],{},"How a column ",[783,1790,1791],{},"reads"," (its label, its format, its colors, the control that edits it) is set once, on the table, and every grid, form and DataView that shows the column uses it. Click a column's title on the table's ",[783,1794,1795],{},"Columns"," tab to open its panel. It has three tabs, and a preview of the table's first rows as a grid will show them.",[780,1798,1799,1800,1803,1804,805,1806,805,1808,812],{},"The presentation is about how values look. What values are ",[823,1801,1802],{},"valid"," stays PostgreSQL's: ",[787,1805,891],{},[787,1807,793],{},[787,1809,789],{},[937,1811],{"caption":1812,"id":1784},"The panel of work_orders.status: its label, and each value of its CHECK list with a label and a color.",[1103,1814,1816],{"id":1815},"properties","Properties",[956,1818,1819,1829],{},[959,1820,1821],{},[962,1822,1823,1826],{},[965,1824,1825],{},"Group",[965,1827,1828],{},"Options",[972,1830,1831,1859,1885,1924],{},[962,1832,1833,1835],{},[977,1834,189],{},[977,1836,1837,1840,1841,1844,1845,1848,1849,1852,1853,1848,1856],{},[783,1838,1839],{},"Label"," (its title everywhere; empty, the column's name humanized: ",[787,1842,1843],{},"due_at"," → ",[823,1846,1847],{},"Due At","), ",[783,1850,1851],{},"Short label"," (a list's header where room is short: ",[823,1854,1855],{},"Qty.",[783,1857,1858],{},"Description",[962,1860,1861,1864],{},[977,1862,1863],{},"In forms",[977,1865,1866,1868,1869,1872,1873,1876,1877,1880,1881,1884],{},[783,1867,402],{}," (what every form edits it with; ",[823,1870,1871],{},"Automatic"," follows the column's type and constraints and says why), ",[783,1874,1875],{},"Help"," (under the input), ",[783,1878,1879],{},"Placeholder"," (an example value), an ",[783,1882,1883],{},"icon"," at the input's start or end, such as a unit",[962,1886,1887,1889],{},[977,1888,239],{},[977,1890,1891,1892,1895,1896,805,1899,805,1902,1848,1905,1908,1909,1912,1913,1916,1917,1895,1920,1923],{},"a number or date ",[783,1893,1894],{},"format"," (",[787,1897,1898],{},"#,##0.00",[787,1900,1901],{},"CURRENCY:USD",[787,1903,1904],{},"dd\u002FMM\u002Fyyyy",[783,1906,1907],{},"True as"," \u002F ",[783,1910,1911],{},"False as"," for a boolean, ",[783,1914,1915],{},"Link"," (a web address, an email or a phone), ",[783,1918,1919],{},"Empty text",[787,1921,1922],{},"—"," by default)",[962,1925,1926,1928],{},[977,1927,1828],{},[977,1929,1930,1931,1933],{},"for a column with a ",[787,1932,793],{}," list, each value's label, color and icon: a status badge in a grid, a kanban's lane, a select's item",[780,1935,1936,1937,1940,1941,1580,1944,1947,1948,1580,1951,1954],{},"Acme's ",[787,1938,1939],{},"work_orders.status"," shows ",[787,1942,1943],{},"IN_PROGRESS",[823,1945,1946],{},"In progress",", in blue, and ",[787,1949,1950],{},"COMPLETED",[823,1952,1953],{},"Completed",", in green.",[1103,1956,1958],{"id":1957},"styles","Styles",[780,1960,1961],{},"How the value always looks in a grid, a table widget or a card (never in a form's input): alignment, size, bold, italic, monospaced, underline, strikethrough, a text color and a background tint. Colors come from the theme's palette, so dark mode keeps working.",[780,1963,1964,1965,1968,1969,1972,1973,812],{},"A whole number set as ",[783,1966,1967],{},"monospaced"," is shown as a code, without a thousands separator: ",[787,1970,1971],{},"3000",", not ",[787,1974,1975],{},"3.000",[1103,1977,1979],{"id":1978},"conditions","Conditions",[780,1981,1982],{},"A condition changes how the column looks when something holds: an order past its due date in red, a stock line at zero dimmed, an invoice paid in part in orange. Each one has:",[956,1984,1985,1994],{},[959,1986,1987],{},[962,1988,1989,1992],{},[965,1990,1991],{},"Field",[965,1993],{},[972,1995,1996,2004,2031,2044],{},[962,1997,1998,2001],{},[977,1999,2000],{},"Name",[977,2002,2003],{},"Unique in the column",[962,2005,2006,2009],{},[977,2007,2008],{},"When",[977,2010,2011,2012,2015,2016,2019,2020,2023,2024,805,2027,2030],{},"A filter in the ",[803,2013,2014],{"href":613},"query language",", built with the filter builder or written as JSON. It can compare with another column of the row (",[787,2017,2018],{},"$ROW.total","), the user (",[787,2021,2022],{},"$USER.id","), dates (",[787,2025,2026],{},"$CURRENT_DATE",[787,2028,2029],{},"$PERIOD",") and related columns",[962,2032,2033,2036],{},[977,2034,2035],{},"Apply to",[977,2037,2038,1751,2041],{},[783,2039,2040],{},"This cell",[783,2042,2043],{},"The whole row",[962,2045,2046,2049],{},[977,2047,2048],{},"Style",[977,2050,2051,2052,2054,2055,1314,2058],{},"the same options as Styles, plus an ",[783,2053,1883],{}," before the value, ",[783,2056,2057],{},"As a badge",[783,2059,2060],{},"Dimmed",[780,2062,2063,2064,2067],{},"Acme's overdue rule, on ",[787,2065,2066],{},"work_orders.due_at",", applied to the whole row:",[1113,2069,2071],{"className":1157,"code":2070,"language":1159,"meta":1118,"style":1118},"{ \"_and\": [\n  { \"due_at\": { \"_lt\": \"$CURRENT_TIMESTAMP\" } },\n  { \"status\": { \"_nin\": \"COMPLETED,CANCELLED\" } }\n] }\n",[787,2072,2073,2088,2126,2160],{"__ignoreMap":1118},[1122,2074,2075,2077,2079,2082,2084,2086],{"class":1124,"line":1125},[1122,2076,1167],{"class":1166},[1122,2078,1170],{"class":1166},[1122,2080,2081],{"class":1173},"_and",[1122,2083,1177],{"class":1166},[1122,2085,1180],{"class":1166},[1122,2087,1476],{"class":1166},[1122,2089,2090,2092,2094,2096,2098,2100,2103,2105,2109,2111,2113,2115,2118,2120,2123],{"class":1124,"line":1131},[1122,2091,1481],{"class":1166},[1122,2093,1170],{"class":1166},[1122,2095,1843],{"class":1188},[1122,2097,1177],{"class":1166},[1122,2099,1180],{"class":1166},[1122,2101,2102],{"class":1166}," {",[1122,2104,1170],{"class":1166},[1122,2106,2108],{"class":2107},"sbssI","_lt",[1122,2110,1177],{"class":1166},[1122,2112,1180],{"class":1166},[1122,2114,1170],{"class":1166},[1122,2116,2117],{"class":1198},"$CURRENT_TIMESTAMP",[1122,2119,1177],{"class":1166},[1122,2121,2122],{"class":1166}," }",[1122,2124,2125],{"class":1166}," },\n",[1122,2127,2128,2130,2132,2134,2136,2138,2140,2142,2145,2147,2149,2151,2154,2156,2158],{"class":1124,"line":1137},[1122,2129,1481],{"class":1166},[1122,2131,1170],{"class":1166},[1122,2133,1504],{"class":1188},[1122,2135,1177],{"class":1166},[1122,2137,1180],{"class":1166},[1122,2139,2102],{"class":1166},[1122,2141,1170],{"class":1166},[1122,2143,2144],{"class":2107},"_nin",[1122,2146,1177],{"class":1166},[1122,2148,1180],{"class":1166},[1122,2150,1170],{"class":1166},[1122,2152,2153],{"class":1198},"COMPLETED,CANCELLED",[1122,2155,1177],{"class":1166},[1122,2157,2122],{"class":1166},[1122,2159,1246],{"class":1166},[1122,2161,2162,2164],{"class":1124,"line":1431},[1122,2163,1561],{"class":1166},[1122,2165,1246],{"class":1166},[780,2167,2168,2169,2172],{},"Conditions are checked in order, and the first that holds wins, a cell's over a row's. ",[783,2170,2171],{},"PostgreSQL evaluates them",": a list sends each condition with its read and paints what PostgreSQL says each row meets, so the rule means exactly what the same filter means in the API. A list can evaluate up to 32 conditions at once. Drag them to reorder, turn one off without deleting it, or duplicate it.",[780,2174,2175],{},"In a Cards or Kanban view, a row condition marks the card with a colored edge, or dims it.",[1103,2177,2179],{"id":2178},"suggest-presentation","Suggest presentation",[780,2181,2182,2184,2185,2188],{},[783,2183,2179],{},", on the Columns tab, proposes a presentation from each column's ",[783,2186,2187],{},"type and constraints",", never from its name, so it works the same in any language:",[848,2190,2191,2194,2200,2206,2217,2223],{},[851,2192,2193],{},"a unique whole number or the primary key → monospaced, as a code;",[851,2195,2196,2197,2199],{},"a column that may be null → ",[787,2198,1922],{}," when empty;",[851,2201,2202,2203,2205],{},"a ",[787,2204,793],{}," pattern → an example value as placeholder, or an email or web link;",[851,2207,2202,2208,2210,2211,1844,2213,2216],{},[787,2209,793],{}," list → a label for each value (",[787,2212,1943],{},[823,2214,2215],{},"In Progress",");",[851,2218,2202,2219,2222],{},[787,2220,2221],{},"COMMENT ON COLUMN"," → its description;",[851,2224,2225],{},"a table without a row display → its first unique, required text column.",[780,2227,2228,2229,2232],{},"Each suggestion shows why. What a column lacks comes ticked; a change to a value it already has comes unticked, so nothing you set is overwritten unless you tick it. For a database you've just connected, ",[783,2230,2231],{},"Suggest presentation for every table"," fills in what's missing everywhere at once.",[1103,2234,2236],{"id":2235},"views-inherit-it","Views inherit it",[780,2238,2239,2240,2243,2244,2247],{},"A view's column that comes straight from a table's column (",[787,2241,2242],{},"SELECT c.name ...",") inherits that column's presentation. PostgreSQL records where each view column comes from, so a replaced view or a renamed column needs nothing. A computed column (",[787,2245,2246],{},"total - paid AS balance",") has none of its own until you give it one.",[1103,2249,2251],{"id":2250},"published-dataviews-keep-theirs","Published DataViews keep theirs",[780,2253,2254,2255,2258,2259,2262,2263,812],{},"A published DataView keeps the presentation it was published with, so changing a label here doesn't change a screen people are using by itself. When you save, the panel lists the published DataViews the change reaches, each with ",[783,2256,2257],{},"Publish now",". The panel also says how many DataViews show the column: ",[823,2260,2261],{},"Changes in 3 DataViews",". See ",[803,2264,126],{"href":2265},"\u002Fdataviews\u002Fpublishing#what-a-version-freezes",[843,2267,2269],{"id":2268},"indexes","Indexes",[780,2271,2272,2273,805,2276,805,2279,805,2282,805,2285,805,2288,1848,2291,2293,2294,1314,2296,2299,2300,2303],{},"The table editor creates indexes on one or more columns, each ascending or descending, with the method (",[787,2274,2275],{},"btree",[787,2277,2278],{},"hash",[787,2280,2281],{},"gist",[787,2283,2284],{},"gin",[787,2286,2287],{},"spgist",[787,2289,2290],{},"brin",[787,2292,789],{},", a partial ",[787,2295,866],{},[787,2297,2298],{},"CONCURRENTLY",". Acme indexes ",[787,2301,2302],{},"vehicle_positions (vehicle, recorded_at DESC)",", which is what the \"latest position per vehicle\" view reads.",[780,2305,2306,2307,2310],{},"Expression indexes, operator classes and ",[787,2308,2309],{},"INCLUDE"," columns are written in the SQL Console.",[843,2312,2314],{"id":2313},"tables-totalbases-role-doesnt-own","Tables TotalBase's role doesn't own",[780,2316,2317],{},"PostgreSQL only lets a table's owner change its structure. If TotalBase's database role doesn't own a table, its page says so, names the owner, and disables structural changes. Exposure, permissions and column presentation stay editable, because they are TotalBase's own settings, not DDL.",[843,2319,2321],{"id":2320},"next-steps","Next steps",[848,2323,2324,2329,2335,2346],{},[851,2325,2326,2328],{},[803,2327,612],{"href":613},": filtering by relation paths.",[851,2330,2331,1314,2333,812],{},[803,2332,96],{"href":97},[803,2334,100],{"href":101},[851,2336,2337,2341,2342,2345],{},[803,2338,2340],{"href":2339},"\u002Fdataviews\u002Fcreating#from-a-table-in-one-step","Creating a DataView › From a table, in one step",": ",[783,2343,2344],{},"Create DataView",", on a table's page.",[851,2347,2348,2351],{},[803,2349,2350],{"href":194},"DataView Settings › Data",": a DataView's columns.",[2353,2354,2355],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":1118,"searchDepth":1125,"depth":1131,"links":2357},[2358,2359,2360,2361,2365,2374,2382,2383,2384],{"id":845,"depth":1131,"text":846},{"id":901,"depth":1131,"text":902},{"id":943,"depth":1131,"text":944},{"id":1100,"depth":1131,"text":1101,"children":2362},[2363,2364],{"id":1105,"depth":1137,"text":793},{"id":1265,"depth":1137,"text":1266},{"id":1287,"depth":1131,"text":1288,"children":2366},[2367,2368,2369,2370,2371,2372,2373],{"id":1306,"depth":1137,"text":1307},{"id":1340,"depth":1137,"text":1341},{"id":1590,"depth":1137,"text":1591},{"id":1641,"depth":1137,"text":1642},{"id":1665,"depth":1137,"text":1666},{"id":1726,"depth":1137,"text":1727},{"id":1771,"depth":1137,"text":1772},{"id":1784,"depth":1131,"text":1785,"children":2375},[2376,2377,2378,2379,2380,2381],{"id":1815,"depth":1137,"text":1816},{"id":1957,"depth":1137,"text":1958},{"id":1978,"depth":1137,"text":1979},{"id":2178,"depth":1137,"text":2179},{"id":2235,"depth":1137,"text":2236},{"id":2250,"depth":1137,"text":2251},{"id":2268,"depth":1131,"text":2269},{"id":2313,"depth":1131,"text":2314},{"id":2320,"depth":1131,"text":2321},"Create and change tables from the admin: columns, keys, constraints and indexes - real PostgreSQL DDL, in one transaction.","md",null,{},true,{"title":92,"description":2385},"WxWwISJ9VwXz9oFqKTw3bA7KurX2dhf18iYm6_-cISI",[2393,2395],{"title":82,"path":83,"stem":84,"description":2394,"children":-1},"Group, order, label and hide what the App shows.",{"title":96,"path":97,"stem":98,"description":2396,"children":-1},"PostgreSQL views as read-only resources: saved queries, joined and computed data, materialized views.",1792339945285]