timestamp.d.cts 1.3 KB

12345678910111213141516171819202122232425262728
  1. import type { LocalDateTime } from 'gel';
  2. import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
  3. import type { ColumnBaseConfig } from "../../column.cjs";
  4. import { entityKind } from "../../entity.cjs";
  5. import type { AnyGelTable } from "../table.cjs";
  6. import { GelColumn } from "./common.cjs";
  7. import { GelLocalDateColumnBaseBuilder } from "./date.common.cjs";
  8. export type GelTimestampBuilderInitial<TName extends string> = GelTimestampBuilder<{
  9. name: TName;
  10. dataType: 'localDateTime';
  11. columnType: 'GelTimestamp';
  12. data: LocalDateTime;
  13. driverParam: LocalDateTime;
  14. enumValues: undefined;
  15. }>;
  16. export declare class GelTimestampBuilder<T extends ColumnBuilderBaseConfig<'localDateTime', 'GelTimestamp'>> extends GelLocalDateColumnBaseBuilder<T> {
  17. static readonly [entityKind]: string;
  18. constructor(name: T['name']);
  19. }
  20. export declare class GelTimestamp<T extends ColumnBaseConfig<'localDateTime', 'GelTimestamp'>> extends GelColumn<T> {
  21. static readonly [entityKind]: string;
  22. constructor(table: AnyGelTable<{
  23. name: T['tableName'];
  24. }>, config: GelTimestampBuilder<T>['config']);
  25. getSQLType(): string;
  26. }
  27. export declare function timestamp(): GelTimestampBuilderInitial<''>;
  28. export declare function timestamp<TName extends string>(name: TName): GelTimestampBuilderInitial<TName>;