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

constructor() — drizzle-orm Function Reference

Architecture documentation for the constructor() function in unique-constraint.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  75d3401e_8bc6_1cb5_e557_e8ea9cb6e59a["constructor()"]
  7820e57a_d7f7_31c5_af1d_bcc6092f9dea["UniqueConstraint"]
  75d3401e_8bc6_1cb5_e557_e8ea9cb6e59a -->|defined in| 7820e57a_d7f7_31c5_af1d_bcc6092f9dea
  843a7e92_dcdc_5cd4_c93f_9a3abdde7fcb["uniqueKeyName()"]
  75d3401e_8bc6_1cb5_e557_e8ea9cb6e59a -->|calls| 843a7e92_dcdc_5cd4_c93f_9a3abdde7fcb
  772cf00d_736d_1079_4b0e_87fc39b092c1["constructor()"]
  75d3401e_8bc6_1cb5_e557_e8ea9cb6e59a -->|calls| 772cf00d_736d_1079_4b0e_87fc39b092c1
  style 75d3401e_8bc6_1cb5_e557_e8ea9cb6e59a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pg-core/unique-constraint.ts lines 64–68

	constructor(readonly table: PgTable, columns: PgColumn[], nullsNotDistinct: boolean, name?: string) {
		this.columns = columns;
		this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));
		this.nullsNotDistinct = nullsNotDistinct;
	}

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/unique-constraint.ts.
Where is constructor() defined?
constructor() is defined in drizzle-orm/src/pg-core/unique-constraint.ts at line 64.
What does constructor() call?
constructor() calls 2 function(s): constructor, uniqueKeyName.

Analyze Your Own Codebase

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

Try Supermodel Free