checks.ts — drizzle-orm Source File
Architecture documentation for checks.ts, a typescript file in the drizzle-orm codebase. 3 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 7b4b19ff_e672_3a3d_638b_e876d01d7300["checks.ts"] 64ae061d_ed9a_c5f9_235a_3f31995a8d54["table.ts"] 7b4b19ff_e672_3a3d_638b_e876d01d7300 --> 64ae061d_ed9a_c5f9_235a_3f31995a8d54 27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"] 7b4b19ff_e672_3a3d_638b_e876d01d7300 --> 27705a9d_afe9_57dd_8c97_e52d8a67d426 be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"] 7b4b19ff_e672_3a3d_638b_e876d01d7300 --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd 64ae061d_ed9a_c5f9_235a_3f31995a8d54["table.ts"] 64ae061d_ed9a_c5f9_235a_3f31995a8d54 --> 7b4b19ff_e672_3a3d_638b_e876d01d7300 5eb95521_a13c_5ed6_36c8_8869eb8138fc["utils.ts"] 5eb95521_a13c_5ed6_36c8_8869eb8138fc --> 7b4b19ff_e672_3a3d_638b_e876d01d7300 style 7b4b19ff_e672_3a3d_638b_e876d01d7300 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { entityKind } from '~/entity.ts';
import type { SQL } from '~/sql/sql.ts';
import type { SQLiteTable } from './table.ts';
export class CheckBuilder {
static readonly [entityKind]: string = 'SQLiteCheckBuilder';
protected brand!: 'SQLiteConstraintBuilder';
constructor(public name: string, public value: SQL) {}
build(table: SQLiteTable): Check {
return new Check(table, this);
}
}
export class Check {
static readonly [entityKind]: string = 'SQLiteCheck';
declare _: {
brand: 'SQLiteCheck';
};
readonly name: string;
readonly value: SQL;
constructor(public table: SQLiteTable, builder: CheckBuilder) {
this.name = builder.name;
this.value = builder.value;
}
}
export function check(name: string, value: SQL): CheckBuilder {
return new CheckBuilder(name, value);
}
Domain
Subdomains
Functions
Classes
Dependencies
- entity.ts
- sql.ts
- table.ts
Source
Frequently Asked Questions
What does checks.ts do?
checks.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, SQLDialects subdomain.
What functions are defined in checks.ts?
checks.ts defines 1 function(s): check.
What does checks.ts depend on?
checks.ts imports 3 module(s): entity.ts, sql.ts, table.ts.
What files import checks.ts?
checks.ts is imported by 2 file(s): table.ts, utils.ts.
Where is checks.ts in the architecture?
checks.ts is located at drizzle-orm/src/sqlite-core/checks.ts (domain: DrizzleORM, subdomain: SQLDialects, directory: drizzle-orm/src/sqlite-core).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free