GelSchema Class — drizzle-orm Architecture
Architecture documentation for the GelSchema class in schema.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 591fdb18_8db8_0265_1d61_0587e77d9cf1["GelSchema"] a24fdf3c_9905_a1c9_be31_c88bf0a5c079["schema.ts"] 591fdb18_8db8_0265_1d61_0587e77d9cf1 -->|defined in| a24fdf3c_9905_a1c9_be31_c88bf0a5c079 1b5da626_48a4_da88_ec63_61ee8d98eae8["constructor()"] 591fdb18_8db8_0265_1d61_0587e77d9cf1 -->|method| 1b5da626_48a4_da88_ec63_61ee8d98eae8 29c98b8a_cd7b_7c3c_899b_3ca6bebfa6e7["getSQL()"] 591fdb18_8db8_0265_1d61_0587e77d9cf1 -->|method| 29c98b8a_cd7b_7c3c_899b_3ca6bebfa6e7 5d8fc822_bd8e_3be4_bca5_dd4abfcc8747["shouldOmitSQLParens()"] 591fdb18_8db8_0265_1d61_0587e77d9cf1 -->|method| 5d8fc822_bd8e_3be4_bca5_dd4abfcc8747
Relationship Graph
Source Code
drizzle-orm/src/gel-core/schema.ts lines 9–42
export class GelSchema<TName extends string = string> implements SQLWrapper {
static readonly [entityKind]: string = 'GelSchema';
constructor(
public readonly schemaName: TName,
) {}
table: GelTableFn<TName> = ((name, columns, extraConfig) => {
return gelTableWithSchema(name, columns, extraConfig, this.schemaName);
});
// view = ((name, columns) => {
// return gelViewWithSchema(name, columns, this.schemaName);
// }) as typeof gelView;
// materializedView = ((name, columns) => {
// return gelMaterializedViewWithSchema(name, columns, this.schemaName);
// }) as typeof gelMaterializedView;
// enum: typeof gelEnum = ((name, values) => {
// return gelEnumWithSchema(name, values, this.schemaName);
// });
sequence: typeof gelSequence = ((name, options) => {
return gelSequenceWithSchema(name, options, this.schemaName);
});
getSQL(): SQL {
return new SQL([sql.identifier(this.schemaName)]);
}
shouldOmitSQLParens(): boolean {
return true;
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the GelSchema class?
GelSchema is a class in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/schema.ts.
Where is GelSchema defined?
GelSchema is defined in drizzle-orm/src/gel-core/schema.ts at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free