drizzle-orm-pg
Advanced tools
Comparing version 0.12.0-beta.11 to 0.12.0-beta.12
@@ -21,3 +21,9 @@ import { ColumnData, ColumnDriverParam, ColumnHasDefault, ColumnNotNull, TableName } from 'drizzle-orm/branded-types'; | ||
} | ||
export declare function date(name: string, mode: 'string'): PgDateStringBuilder; | ||
export declare function date(name: string, mode?: 'date'): PgDateBuilder; | ||
export declare function date(name: string, config?: { | ||
mode: 'string'; | ||
precision: number; | ||
}): PgDateStringBuilder; | ||
export declare function date(name: string, config?: { | ||
mode: 'date'; | ||
precision: number; | ||
}): PgDateBuilder; |
@@ -44,4 +44,4 @@ "use strict"; | ||
exports.PgDateString = PgDateString; | ||
function date(name, mode = 'date') { | ||
if (mode === 'date') { | ||
function date(name, config) { | ||
if ((config === null || config === void 0 ? void 0 : config.mode) === 'date') { | ||
return new PgDateBuilder(name); | ||
@@ -48,0 +48,0 @@ } |
@@ -31,12 +31,12 @@ import { ColumnData, ColumnDriverParam, ColumnHasDefault, ColumnNotNull, TableName } from 'drizzle-orm/branded-types'; | ||
export declare type PrecisionLimit = 0 | 1 | 2 | 3 | 4 | 5 | 6; | ||
export declare type TimestampConfig<TMode extends 'string' | 'date' = 'string' | 'date'> = { | ||
export declare function timestamp(name: string): PgTimestampBuilder; | ||
export declare function timestamp(name: string, config: { | ||
mode: 'string'; | ||
precision?: PrecisionLimit; | ||
} & ({ | ||
mode: TMode; | ||
withTimezone?: boolean; | ||
} | { | ||
mode?: TMode; | ||
withTimezone: boolean; | ||
}); | ||
export declare function timestamp<TWithTZ extends boolean>(name: string, config?: TimestampConfig<'date'>): PgTimestampBuilder; | ||
export declare function timestamp<TWithTZ extends boolean>(name: string, config: TimestampConfig<'string'>): PgTimestampStringBuilder; | ||
}): PgTimestampStringBuilder; | ||
export declare function timestamp(name: string, config: { | ||
mode?: 'date'; | ||
precision?: PrecisionLimit; | ||
withTimezone?: boolean; | ||
}): PgTimestampBuilder; |
@@ -63,4 +63,5 @@ "use strict"; | ||
return new PgTimestampBuilder(name, (_b = config === null || config === void 0 ? void 0 : config.withTimezone) !== null && _b !== void 0 ? _b : false, config === null || config === void 0 ? void 0 : config.precision); | ||
; | ||
} | ||
exports.timestamp = timestamp; | ||
//# sourceMappingURL=timestamp.js.map |
{ | ||
"name": "drizzle-orm-pg", | ||
"version": "0.12.0-beta.11", | ||
"version": "0.12.0-beta.12", | ||
"description": "Drizzle ORM package for PostgreSQL database", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
209631
3103