cacheTable() — drizzle-orm Function Reference
Architecture documentation for the cacheTable() function in casing.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 7e5328d2_b26d_89a1_f1f5_24c63e5ea74a["cacheTable()"] 5c81fdb3_ce13_bae3_7b2d_234662703206["CasingCache"] 7e5328d2_b26d_89a1_f1f5_24c63e5ea74a -->|defined in| 5c81fdb3_ce13_bae3_7b2d_234662703206 28c82d92_75b9_f8d4_89a3_9efb6eef87e6["getColumnCasing()"] 28c82d92_75b9_f8d4_89a3_9efb6eef87e6 -->|calls| 7e5328d2_b26d_89a1_f1f5_24c63e5ea74a style 7e5328d2_b26d_89a1_f1f5_24c63e5ea74a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/casing.ts lines 58–70
private cacheTable(table: Table) {
const schema = table[Table.Symbol.Schema] ?? 'public';
const tableName = table[Table.Symbol.OriginalName];
const tableKey = `${schema}.${tableName}`;
if (!this.cachedTables[tableKey]) {
for (const column of Object.values(table[Table.Symbol.Columns])) {
const columnKey = `${tableKey}.${column.name}`;
this.cache[columnKey] = this.convert(column.name);
}
this.cachedTables[tableKey] = true;
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does cacheTable() do?
cacheTable() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/casing.ts.
Where is cacheTable() defined?
cacheTable() is defined in drizzle-orm/src/casing.ts at line 58.
What calls cacheTable()?
cacheTable() is called by 1 function(s): getColumnCasing.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free