PrimaryKeyBuilder Class — drizzle-orm Architecture
Architecture documentation for the PrimaryKeyBuilder class in primary-keys.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 3deb220b_61cc_e661_7d0d_e70e532fee18["PrimaryKeyBuilder"] 63d21212_2bf5_401e_92eb_15e737e0575b["primary-keys.ts"] 3deb220b_61cc_e661_7d0d_e70e532fee18 -->|defined in| 63d21212_2bf5_401e_92eb_15e737e0575b b7f05a5a_1f7c_aee3_cf6a_3b77bd1fdf64["constructor()"] 3deb220b_61cc_e661_7d0d_e70e532fee18 -->|method| b7f05a5a_1f7c_aee3_cf6a_3b77bd1fdf64 cd65a11d_75ea_a9b3_c3c6_9a66d4da6977["build()"] 3deb220b_61cc_e661_7d0d_e70e532fee18 -->|method| cd65a11d_75ea_a9b3_c3c6_9a66d4da6977
Relationship Graph
Source Code
drizzle-orm/src/mysql-core/primary-keys.ts lines 25–46
export class PrimaryKeyBuilder {
static readonly [entityKind]: string = 'MySqlPrimaryKeyBuilder';
/** @internal */
columns: MySqlColumn[];
/** @internal */
name?: string;
constructor(
columns: MySqlColumn[],
name?: string,
) {
this.columns = columns;
this.name = name;
}
/** @internal */
build(table: MySqlTable): PrimaryKey {
return new PrimaryKey(table, this.columns, this.name);
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the PrimaryKeyBuilder class?
PrimaryKeyBuilder is a class in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/primary-keys.ts.
Where is PrimaryKeyBuilder defined?
PrimaryKeyBuilder is defined in drizzle-orm/src/mysql-core/primary-keys.ts at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free