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
  a6be4582_07d7_7385_0d48_0db4b2f06175["can()"]
  5e30c437_cda7_7aa2_e07f_398f11b4b765["PgEnableRlsConvertor"]
  a6be4582_07d7_7385_0d48_0db4b2f06175 -->|defined in| 5e30c437_cda7_7aa2_e07f_398f11b4b765
  style a6be4582_07d7_7385_0d48_0db4b2f06175 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/sqlgenerator.ts lines 360–362

	override can(statement: JsonStatement, dialect: Dialect): boolean {
		return statement.type === 'enable_rls' && 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 360.

Analyze Your Own Codebase

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

Try Supermodel Free