ViewBuilderCore Class — drizzle-orm Architecture
Architecture documentation for the ViewBuilderCore class in view.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 6b3708db_738c_3b26_2eda_7803c654a946["ViewBuilderCore"] f3a29a26_df86_4100_d5ea_bc3a420b1722["view.ts"] 6b3708db_738c_3b26_2eda_7803c654a946 -->|defined in| f3a29a26_df86_4100_d5ea_bc3a420b1722 a2316a92_0db3_dfb0_395e_4b5fbb775201["constructor()"] 6b3708db_738c_3b26_2eda_7803c654a946 -->|method| a2316a92_0db3_dfb0_395e_4b5fbb775201 fc564938_2504_acc9_aa5c_81af9240049b["algorithm()"] 6b3708db_738c_3b26_2eda_7803c654a946 -->|method| fc564938_2504_acc9_aa5c_81af9240049b 0b919b9c_f1a2_a8f1_ba28_91934ff5fd44["sqlSecurity()"] 6b3708db_738c_3b26_2eda_7803c654a946 -->|method| 0b919b9c_f1a2_a8f1_ba28_91934ff5fd44 471c942d_1230_b5ec_52d1_a2937e53859c["withCheckOption()"] 6b3708db_738c_3b26_2eda_7803c654a946 -->|method| 471c942d_1230_b5ec_52d1_a2937e53859c
Relationship Graph
Source Code
drizzle-orm/src/mysql-core/view.ts lines 20–55
export class ViewBuilderCore<TConfig extends { name: string; columns?: unknown }> {
static readonly [entityKind]: string = 'MySqlViewBuilder';
declare readonly _: {
readonly name: TConfig['name'];
readonly columns: TConfig['columns'];
};
constructor(
protected name: TConfig['name'],
protected schema: string | undefined,
) {}
protected config: ViewBuilderConfig = {};
algorithm(
algorithm: Exclude<ViewBuilderConfig['algorithm'], undefined>,
): this {
this.config.algorithm = algorithm;
return this;
}
sqlSecurity(
sqlSecurity: Exclude<ViewBuilderConfig['sqlSecurity'], undefined>,
): this {
this.config.sqlSecurity = sqlSecurity;
return this;
}
withCheckOption(
withCheckOption?: Exclude<ViewBuilderConfig['withCheckOption'], undefined>,
): this {
this.config.withCheckOption = withCheckOption ?? 'cascaded';
return this;
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the ViewBuilderCore class?
ViewBuilderCore is a class in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/view.ts.
Where is ViewBuilderCore defined?
ViewBuilderCore is defined in drizzle-orm/src/mysql-core/view.ts at line 20.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free