Home / Function/ primaryKey() — drizzle-orm Function Reference

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
  59dc979c_9138_13fa_0f79_79e5f5326e1b["primaryKey()"]
  23f0730e_a6b8_4342_cdc4_6f458b4467d7["primary-keys.ts"]
  59dc979c_9138_13fa_0f79_79e5f5326e1b -->|defined in| 23f0730e_a6b8_4342_cdc4_6f458b4467d7
  style 59dc979c_9138_13fa_0f79_79e5f5326e1b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/singlestore-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

Frequently Asked Questions

What does primaryKey() do?
primaryKey() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/singlestore-core/primary-keys.ts.
Where is primaryKey() defined?
primaryKey() is defined in drizzle-orm/src/singlestore-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