primaryKey() — drizzle-orm Function Reference
Architecture documentation for the primaryKey() function in primary-keys.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 82bc88b3_8eae_91c6_9e33_09d8dcd3a7a4["primaryKey()"] 471611d2_cce2_4786_c10b_d1a110fdccc3["primary-keys.ts"] 82bc88b3_8eae_91c6_9e33_09d8dcd3a7a4 -->|defined in| 471611d2_cce2_4786_c10b_d1a110fdccc3 style 82bc88b3_8eae_91c6_9e33_09d8dcd3a7a4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/gel-core/primary-keys.ts lines 18–23
export function primaryKey(...config: any) {
if (config[0].columns) {
return new PrimaryKeyBuilder(config[0].columns, config[0].name);
}
return new PrimaryKeyBuilder(config);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does primaryKey() do?
primaryKey() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/primary-keys.ts.
Where is primaryKey() defined?
primaryKey() is defined in drizzle-orm/src/gel-core/primary-keys.ts at line 18.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free