PgRole Class — drizzle-orm Architecture
Architecture documentation for the PgRole class in roles.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD b1c7e362_ebc2_2da6_869e_360a3f09e129["PgRole"] ec737a7b_d290_c457_5fa4_eec6d91d420e["roles.ts"] b1c7e362_ebc2_2da6_869e_360a3f09e129 -->|defined in| ec737a7b_d290_c457_5fa4_eec6d91d420e a67fb458_1728_864b_c273_bc3cec9e5824["constructor()"] b1c7e362_ebc2_2da6_869e_360a3f09e129 -->|method| a67fb458_1728_864b_c273_bc3cec9e5824 af3d506b_aa25_858d_b092_39e6fedaf2a1["existing()"] b1c7e362_ebc2_2da6_869e_360a3f09e129 -->|method| af3d506b_aa25_858d_b092_39e6fedaf2a1
Relationship Graph
Source Code
drizzle-orm/src/pg-core/roles.ts lines 9–37
export class PgRole implements PgRoleConfig {
static readonly [entityKind]: string = 'PgRole';
/** @internal */
_existing?: boolean;
/** @internal */
readonly createDb: PgRoleConfig['createDb'];
/** @internal */
readonly createRole: PgRoleConfig['createRole'];
/** @internal */
readonly inherit: PgRoleConfig['inherit'];
constructor(
readonly name: string,
config?: PgRoleConfig,
) {
if (config) {
this.createDb = config.createDb;
this.createRole = config.createRole;
this.inherit = config.inherit;
}
}
existing(): this {
this._existing = true;
return this;
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the PgRole class?
PgRole is a class in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/roles.ts.
Where is PgRole defined?
PgRole is defined in drizzle-orm/src/pg-core/roles.ts at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free