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

can() — drizzle-orm Function Reference

Architecture documentation for the can() function in sqlgenerator.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  08a2d1d2_9e81_69d1_4408_53b03017c542["can()"]
  268497d9_fcbe_4631_f402_e99875340359["PgAlterTableDeleteCheckConstraintConvertor"]
  08a2d1d2_9e81_69d1_4408_53b03017c542 -->|defined in| 268497d9_fcbe_4631_f402_e99875340359
  style 08a2d1d2_9e81_69d1_4408_53b03017c542 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/sqlgenerator.ts lines 1198–1202

	can(statement: JsonDeleteCheckConstraint, dialect: Dialect): boolean {
		return (
			statement.type === 'delete_check_constraint' && dialect === 'postgresql'
		);
	}

Domain

Subdomains

Frequently Asked Questions

What does can() do?
can() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/sqlgenerator.ts.
Where is can() defined?
can() is defined in drizzle-kit/src/sqlgenerator.ts at line 1198.

Analyze Your Own Codebase

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

Try Supermodel Free