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 f39d1a38_676c_c9d6_ed8b_219e95eb0ee7["PrimaryKeyBuilder"] 471611d2_cce2_4786_c10b_d1a110fdccc3["primary-keys.ts"] f39d1a38_676c_c9d6_ed8b_219e95eb0ee7 -->|defined in| 471611d2_cce2_4786_c10b_d1a110fdccc3 e7641265_e452_2b2c_693b_8e36169e6bcf["constructor()"] f39d1a38_676c_c9d6_ed8b_219e95eb0ee7 -->|method| e7641265_e452_2b2c_693b_8e36169e6bcf 91a8a4e9_2fd5_8c6e_dcd1_05ecaac8e339["build()"] f39d1a38_676c_c9d6_ed8b_219e95eb0ee7 -->|method| 91a8a4e9_2fd5_8c6e_dcd1_05ecaac8e339
Relationship Graph
Source Code
drizzle-orm/src/gel-core/primary-keys.ts lines 25–46
export class PrimaryKeyBuilder {
static readonly [entityKind]: string = 'GelPrimaryKeyBuilder';
/** @internal */
columns: GelColumn[];
/** @internal */
name?: string;
constructor(
columns: GelColumn[],
name?: string,
) {
this.columns = columns;
this.name = name;
}
/** @internal */
build(table: GelTable): 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/gel-core/primary-keys.ts.
Where is PrimaryKeyBuilder defined?
PrimaryKeyBuilder is defined in drizzle-orm/src/gel-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