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

constructor() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  cbb6f329_9357_fed3_2035_78d5366ff109["constructor()"]
  fb5adfe9_0485_7f32_8c4e_5c81265ae2e4["PgPolicy"]
  cbb6f329_9357_fed3_2035_78d5366ff109 -->|defined in| fb5adfe9_0485_7f32_8c4e_5c81265ae2e4
  a67fb458_1728_864b_c273_bc3cec9e5824["constructor()"]
  cbb6f329_9357_fed3_2035_78d5366ff109 -->|calls| a67fb458_1728_864b_c273_bc3cec9e5824
  style cbb6f329_9357_fed3_2035_78d5366ff109 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pg-core/policies.ts lines 35–46

	constructor(
		readonly name: string,
		config?: PgPolicyConfig,
	) {
		if (config) {
			this.as = config.as;
			this.for = config.for;
			this.to = config.to;
			this.using = config.using;
			this.withCheck = config.withCheck;
		}
	}

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/policies.ts.
Where is constructor() defined?
constructor() is defined in drizzle-orm/src/pg-core/policies.ts at line 35.
What does constructor() call?
constructor() calls 1 function(s): constructor.

Analyze Your Own Codebase

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

Try Supermodel Free