GelPolicy Class — drizzle-orm Architecture
Architecture documentation for the GelPolicy class in policies.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD f86054e6_9a36_2142_b020_d41b11f58b79["GelPolicy"] 2653b8be_3a2e_d91d_bd2c_70b1c16e3b68["policies.ts"] f86054e6_9a36_2142_b020_d41b11f58b79 -->|defined in| 2653b8be_3a2e_d91d_bd2c_70b1c16e3b68 e353067a_175a_eb2e_f2ba_bd078e4b4e10["constructor()"] f86054e6_9a36_2142_b020_d41b11f58b79 -->|method| e353067a_175a_eb2e_f2ba_bd078e4b4e10 15f16149_dfeb_b98d_13e8_5d4dd1f922e7["link()"] f86054e6_9a36_2142_b020_d41b11f58b79 -->|method| 15f16149_dfeb_b98d_13e8_5d4dd1f922e7
Relationship Graph
Source Code
drizzle-orm/src/gel-core/policies.ts lines 23–52
export class GelPolicy implements GelPolicyConfig {
static readonly [entityKind]: string = 'GelPolicy';
readonly as: GelPolicyConfig['as'];
readonly for: GelPolicyConfig['for'];
readonly to: GelPolicyConfig['to'];
readonly using: GelPolicyConfig['using'];
readonly withCheck: GelPolicyConfig['withCheck'];
/** @internal */
_linkedTable?: GelTable;
constructor(
readonly name: string,
config?: GelPolicyConfig,
) {
if (config) {
this.as = config.as;
this.for = config.for;
this.to = config.to;
this.using = config.using;
this.withCheck = config.withCheck;
}
}
link(table: GelTable): this {
this._linkedTable = table;
return this;
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the GelPolicy class?
GelPolicy is a class in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/policies.ts.
Where is GelPolicy defined?
GelPolicy is defined in drizzle-orm/src/gel-core/policies.ts at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free