PgTime Class — drizzle-orm Architecture
Architecture documentation for the PgTime class in time.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 75a3e234_f226_bbda_a99e_9ec5680b4086["PgTime"] 7102357c_0ef2_b03e_a1a8_871e6fea8eac["time.ts"] 75a3e234_f226_bbda_a99e_9ec5680b4086 -->|defined in| 7102357c_0ef2_b03e_a1a8_871e6fea8eac 8c593f11_949b_84ce_89ed_9572aafaf86f["constructor()"] 75a3e234_f226_bbda_a99e_9ec5680b4086 -->|method| 8c593f11_949b_84ce_89ed_9572aafaf86f a3fa3796_367a_c5c3_524d_2119b83ede94["getSQLType()"] 75a3e234_f226_bbda_a99e_9ec5680b4086 -->|method| a3fa3796_367a_c5c3_524d_2119b83ede94
Relationship Graph
Source Code
drizzle-orm/src/pg-core/columns/time.ts lines 43–59
export class PgTime<T extends ColumnBaseConfig<'string', 'PgTime'>> extends PgColumn<T> {
static override readonly [entityKind]: string = 'PgTime';
readonly withTimezone: boolean;
readonly precision: number | undefined;
constructor(table: AnyPgTable<{ name: T['tableName'] }>, config: PgTimeBuilder<T>['config']) {
super(table, config);
this.withTimezone = config.withTimezone;
this.precision = config.precision;
}
getSQLType(): string {
const precision = this.precision === undefined ? '' : `(${this.precision})`;
return `time${precision}${this.withTimezone ? ' with time zone' : ''}`;
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the PgTime class?
PgTime is a class in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/columns/time.ts.
Where is PgTime defined?
PgTime is defined in drizzle-orm/src/pg-core/columns/time.ts at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free