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 35be54b0_979d_726f_b396_86ad54fdbc25["PrimaryKeyBuilder"] 87a357d2_c2ec_b04d_8912_3b8be2a92815["primary-keys.ts"] 35be54b0_979d_726f_b396_86ad54fdbc25 -->|defined in| 87a357d2_c2ec_b04d_8912_3b8be2a92815 0987cf3d_94ab_14f4_22ce_6f92437829ab["constructor()"] 35be54b0_979d_726f_b396_86ad54fdbc25 -->|method| 0987cf3d_94ab_14f4_22ce_6f92437829ab 185bf7ca_eb1a_b3b0_8cab_b4788416ad2a["build()"] 35be54b0_979d_726f_b396_86ad54fdbc25 -->|method| 185bf7ca_eb1a_b3b0_8cab_b4788416ad2a
Relationship Graph
Source Code
drizzle-orm/src/pg-core/primary-keys.ts lines 25–46
export class PrimaryKeyBuilder {
static readonly [entityKind]: string = 'PgPrimaryKeyBuilder';
/** @internal */
columns: PgColumn[];
/** @internal */
name?: string;
constructor(
columns: PgColumn[],
name?: string,
) {
this.columns = columns;
this.name = name;
}
/** @internal */
build(table: PgTable): 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/pg-core/primary-keys.ts.
Where is PrimaryKeyBuilder defined?
PrimaryKeyBuilder is defined in drizzle-orm/src/pg-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