PgCustomColumnBuilder Class — drizzle-orm Architecture
Architecture documentation for the PgCustomColumnBuilder class in custom.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 3ab2fad2_bd5c_f94c_01b0_7a6ff24eeb86["PgCustomColumnBuilder"] 2d665331_c10f_e80b_925f_d2148b29ca86["custom.ts"] 3ab2fad2_bd5c_f94c_01b0_7a6ff24eeb86 -->|defined in| 2d665331_c10f_e80b_925f_d2148b29ca86 bfab6770_6be8_71a7_94a6_83194b760394["constructor()"] 3ab2fad2_bd5c_f94c_01b0_7a6ff24eeb86 -->|method| bfab6770_6be8_71a7_94a6_83194b760394 32367b4e_74b0_03fd_5321_63ee1db574bd["build()"] 3ab2fad2_bd5c_f94c_01b0_7a6ff24eeb86 -->|method| 32367b4e_74b0_03fd_5321_63ee1db574bd
Relationship Graph
Source Code
drizzle-orm/src/pg-core/columns/custom.ts lines 25–58
export class PgCustomColumnBuilder<T extends ColumnBuilderBaseConfig<'custom', 'PgCustomColumn'>>
extends PgColumnBuilder<
T,
{
fieldConfig: CustomTypeValues['config'];
customTypeParams: CustomTypeParams<any>;
},
{
pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
}
>
{
static override readonly [entityKind]: string = 'PgCustomColumnBuilder';
constructor(
name: T['name'],
fieldConfig: CustomTypeValues['config'],
customTypeParams: CustomTypeParams<any>,
) {
super(name, 'custom', 'PgCustomColumn');
this.config.fieldConfig = fieldConfig;
this.config.customTypeParams = customTypeParams;
}
/** @internal */
build<TTableName extends string>(
table: AnyPgTable<{ name: TTableName }>,
): PgCustomColumn<MakeColumnConfig<T, TTableName>> {
return new PgCustomColumn<MakeColumnConfig<T, TTableName>>(
table,
this.config as ColumnBuilderRuntimeConfig<any, any>,
);
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the PgCustomColumnBuilder class?
PgCustomColumnBuilder is a class in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/columns/custom.ts.
Where is PgCustomColumnBuilder defined?
PgCustomColumnBuilder is defined in drizzle-orm/src/pg-core/columns/custom.ts at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free