timestamp.ts — drizzle-orm Source File
Architecture documentation for timestamp.ts, a typescript file in the drizzle-orm codebase. 8 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR eb260b78_e826_4d83_9967_4a3bb3d4d983["timestamp.ts"] a74dd48d_d5e3_6bb4_19c7_1954c9126816["common.ts"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> a74dd48d_d5e3_6bb4_19c7_1954c9126816 d67beed0_fcf6_77d7_10cf_cdcfd53f8551["GelColumn"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> d67beed0_fcf6_77d7_10cf_cdcfd53f8551 ea6938a5_c62e_1dc6_d447_a640546b26c6["date.common.ts"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> ea6938a5_c62e_1dc6_d447_a640546b26c6 90067f6e_33cd_67c4_3575_3758cdacb6e2["gel"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> 90067f6e_33cd_67c4_3575_3758cdacb6e2 2dc784c6_95e9_4e28_ec81_7caf4acbd426["column-builder.ts"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> 2dc784c6_95e9_4e28_ec81_7caf4acbd426 05f0a280_d0c9_693a_a4bf_83cc671012d2["column.ts"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> 05f0a280_d0c9_693a_a4bf_83cc671012d2 27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> 27705a9d_afe9_57dd_8c97_e52d8a67d426 c1a47e5e_63aa_1ab2_abac_86e509f63e7c["table.ts"] eb260b78_e826_4d83_9967_4a3bb3d4d983 --> c1a47e5e_63aa_1ab2_abac_86e509f63e7c ee61f0b9_206c_6b7b_5671_49b96bcf3a63["all.ts"] ee61f0b9_206c_6b7b_5671_49b96bcf3a63 --> eb260b78_e826_4d83_9967_4a3bb3d4d983 6972d39c_a1ff_d9cf_1e99_15f684fd5e42["dialect.ts"] 6972d39c_a1ff_d9cf_1e99_15f684fd5e42 --> eb260b78_e826_4d83_9967_4a3bb3d4d983 style eb260b78_e826_4d83_9967_4a3bb3d4d983 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { LocalDateTime } from 'gel';
import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';
import type { ColumnBaseConfig } from '~/column.ts';
import { entityKind } from '~/entity.ts';
import type { AnyGelTable } from '~/gel-core/table.ts';
import { GelColumn } from './common.ts';
import { GelLocalDateColumnBaseBuilder } from './date.common.ts';
export type GelTimestampBuilderInitial<TName extends string> = GelTimestampBuilder<{
name: TName;
dataType: 'localDateTime';
columnType: 'GelTimestamp';
data: LocalDateTime;
driverParam: LocalDateTime;
enumValues: undefined;
}>;
export class GelTimestampBuilder<T extends ColumnBuilderBaseConfig<'localDateTime', 'GelTimestamp'>>
extends GelLocalDateColumnBaseBuilder<
T
>
{
static override readonly [entityKind]: string = 'GelTimestampBuilder';
constructor(
name: T['name'],
) {
super(name, 'localDateTime', 'GelTimestamp');
}
/** @internal */
override build<TTableName extends string>(
table: AnyGelTable<{ name: TTableName }>,
): GelTimestamp<MakeColumnConfig<T, TTableName>> {
return new GelTimestamp<MakeColumnConfig<T, TTableName>>(
table,
this.config as ColumnBuilderRuntimeConfig<any, any>,
);
}
}
export class GelTimestamp<T extends ColumnBaseConfig<'localDateTime', 'GelTimestamp'>> extends GelColumn<T> {
static override readonly [entityKind]: string = 'GelTimestamp';
constructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelTimestampBuilder<T>['config']) {
super(table, config);
}
getSQLType(): string {
return 'cal::local_datetime';
}
}
export function timestamp(): GelTimestampBuilderInitial<''>;
export function timestamp<TName extends string>(
name: TName,
): GelTimestampBuilderInitial<TName>;
export function timestamp(name?: string) {
return new GelTimestampBuilder(name ?? '');
}
Domain
Subdomains
Functions
Classes
Dependencies
- GelColumn
- column-builder.ts
- column.ts
- common.ts
- date.common.ts
- entity.ts
- gel
- table.ts
Source
Frequently Asked Questions
What does timestamp.ts do?
timestamp.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, RelationalQuery subdomain.
What functions are defined in timestamp.ts?
timestamp.ts defines 1 function(s): timestamp.
What does timestamp.ts depend on?
timestamp.ts imports 8 module(s): GelColumn, column-builder.ts, column.ts, common.ts, date.common.ts, entity.ts, gel, table.ts.
What files import timestamp.ts?
timestamp.ts is imported by 2 file(s): all.ts, dialect.ts.
Where is timestamp.ts in the architecture?
timestamp.ts is located at drizzle-orm/src/gel-core/columns/timestamp.ts (domain: DrizzleORM, subdomain: RelationalQuery, directory: drizzle-orm/src/gel-core/columns).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free