tablesSchema() — astro Function Reference
Architecture documentation for the tablesSchema() function in schemas.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 291ab297_5857_6d20_809b_962dcc7948cb["tablesSchema()"] 05094702_dfea_fe15_694a_0f5d1d294954["schemas.ts"] 291ab297_5857_6d20_809b_962dcc7948cb -->|defined in| 05094702_dfea_fe15_694a_0f5d1d294954 style 291ab297_5857_6d20_809b_962dcc7948cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/db/src/core/schemas.ts lines 200–216
(rawTables) => {
// Use `z.any()` to avoid breaking object references
const tables = z.record(z.string(), z.any()).parse(rawTables, { error: errorMap });
for (const [tableName, table] of Object.entries(tables)) {
// Append table and column names to columns.
// Used to track table info for references.
table.getName = () => tableName;
const { columns } = z
.object({ columns: z.record(z.string(), z.any()) })
.parse(table, { error: errorMap });
for (const [columnName, column] of Object.entries(columns)) {
column.schema.name = columnName;
column.schema.collection = tableName;
}
}
return rawTables;
},
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does tablesSchema() do?
tablesSchema() is a function in the astro codebase, defined in packages/db/src/core/schemas.ts.
Where is tablesSchema() defined?
tablesSchema() is defined in packages/db/src/core/schemas.ts at line 200.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free