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

on() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  6c6a1283_d4a1_873c_20cd_74b0717607db["on()"]
  b4d580a1_0f54_2e9a_89ac_cdf1e6eda308["UniqueOnConstraintBuilder"]
  6c6a1283_d4a1_873c_20cd_74b0717607db -->|defined in| b4d580a1_0f54_2e9a_89ac_cdf1e6eda308
  style 6c6a1283_d4a1_873c_20cd_74b0717607db fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/gel-core/unique-constraint.ts lines 52–54

	on(...columns: [GelColumn, ...GelColumn[]]) {
		return new UniqueConstraintBuilder(columns, this.name);
	}

Domain

Subdomains

Frequently Asked Questions

What does on() do?
on() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/unique-constraint.ts.
Where is on() defined?
on() is defined in drizzle-orm/src/gel-core/unique-constraint.ts at line 52.

Analyze Your Own Codebase

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

Try Supermodel Free