Home / Function/ hasPrimaryKey() — astro Function Reference

hasPrimaryKey() — astro Function Reference

Architecture documentation for the hasPrimaryKey() function in utils.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  b046a7f1_d7ff_f34f_c94f_7bafe812126d["hasPrimaryKey()"]
  99e40dcb_3c3c_9f4c_eb6e_551c6ac52da6["utils.ts"]
  b046a7f1_d7ff_f34f_c94f_7bafe812126d -->|defined in| 99e40dcb_3c3c_9f4c_eb6e_551c6ac52da6
  style b046a7f1_d7ff_f34f_c94f_7bafe812126d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/db/src/runtime/utils.ts lines 5–7

export function hasPrimaryKey(column: DBColumn) {
	return 'primaryKey' in column.schema && !!column.schema.primaryKey;
}

Domain

Subdomains

Frequently Asked Questions

What does hasPrimaryKey() do?
hasPrimaryKey() is a function in the astro codebase, defined in packages/db/src/runtime/utils.ts.
Where is hasPrimaryKey() defined?
hasPrimaryKey() is defined in packages/db/src/runtime/utils.ts at line 5.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free