drizzle-orm 0.39.3 → 0.40.0-af1f2fe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/column-builder.cjs.map +1 -1
- package/column-builder.d.cts +6 -5
- package/column-builder.d.ts +6 -5
- package/column-builder.js.map +1 -1
- package/gel/driver.cjs +97 -0
- package/gel/driver.cjs.map +1 -0
- package/gel/driver.d.cts +38 -0
- package/gel/driver.d.ts +38 -0
- package/gel/driver.js +74 -0
- package/gel/driver.js.map +1 -0
- package/gel/index.cjs +25 -0
- package/gel/index.cjs.map +1 -0
- package/gel/index.d.cts +2 -0
- package/gel/index.d.ts +2 -0
- package/gel/index.js +3 -0
- package/gel/index.js.map +1 -0
- package/gel/migrator.cjs +5 -0
- package/gel/migrator.cjs.map +1 -0
- package/gel/migrator.d.cts +1 -0
- package/gel/migrator.d.ts +1 -0
- package/gel/migrator.js +4 -0
- package/gel/migrator.js.map +1 -0
- package/gel/session.cjs +139 -0
- package/gel/session.cjs.map +1 -0
- package/gel/session.d.cts +47 -0
- package/gel/session.d.ts +47 -0
- package/gel/session.js +113 -0
- package/gel/session.js.map +1 -0
- package/gel-core/alias.cjs +32 -0
- package/gel-core/alias.cjs.map +1 -0
- package/gel-core/alias.d.cts +4 -0
- package/gel-core/alias.d.ts +4 -0
- package/gel-core/alias.js +8 -0
- package/gel-core/alias.js.map +1 -0
- package/gel-core/checks.cjs +58 -0
- package/gel-core/checks.cjs.map +1 -0
- package/gel-core/checks.d.cts +18 -0
- package/gel-core/checks.d.ts +18 -0
- package/gel-core/checks.js +32 -0
- package/gel-core/checks.js.map +1 -0
- package/gel-core/columns/all.cjs +72 -0
- package/gel-core/columns/all.cjs.map +1 -0
- package/gel-core/columns/all.d.cts +43 -0
- package/gel-core/columns/all.d.ts +43 -0
- package/gel-core/columns/all.js +48 -0
- package/gel-core/columns/all.js.map +1 -0
- package/gel-core/columns/bigint.cjs +54 -0
- package/gel-core/columns/bigint.cjs.map +1 -0
- package/gel-core/columns/bigint.d.cts +23 -0
- package/gel-core/columns/bigint.d.ts +23 -0
- package/gel-core/columns/bigint.js +28 -0
- package/gel-core/columns/bigint.js.map +1 -0
- package/gel-core/columns/bigintT.cjs +60 -0
- package/gel-core/columns/bigintT.cjs.map +1 -0
- package/gel-core/columns/bigintT.d.cts +24 -0
- package/gel-core/columns/bigintT.d.ts +24 -0
- package/gel-core/columns/bigintT.js +34 -0
- package/gel-core/columns/bigintT.js.map +1 -0
- package/gel-core/columns/boolean.cjs +53 -0
- package/gel-core/columns/boolean.cjs.map +1 -0
- package/gel-core/columns/boolean.d.cts +22 -0
- package/gel-core/columns/boolean.d.ts +22 -0
- package/gel-core/columns/boolean.js +27 -0
- package/gel-core/columns/boolean.js.map +1 -0
- package/gel-core/columns/bytes.cjs +56 -0
- package/gel-core/columns/bytes.cjs.map +1 -0
- package/gel-core/columns/bytes.d.cts +22 -0
- package/gel-core/columns/bytes.d.ts +22 -0
- package/gel-core/columns/bytes.js +30 -0
- package/gel-core/columns/bytes.js.map +1 -0
- package/gel-core/columns/common.cjs +213 -0
- package/gel-core/columns/common.cjs.map +1 -0
- package/gel-core/columns/common.d.cts +147 -0
- package/gel-core/columns/common.d.ts +147 -0
- package/gel-core/columns/common.js +184 -0
- package/gel-core/columns/common.js.map +1 -0
- package/gel-core/columns/custom.cjs +77 -0
- package/gel-core/columns/custom.cjs.map +1 -0
- package/gel-core/columns/custom.d.cts +155 -0
- package/gel-core/columns/custom.d.ts +155 -0
- package/gel-core/columns/custom.js +51 -0
- package/gel-core/columns/custom.js.map +1 -0
- package/gel-core/columns/date-duration.cjs +56 -0
- package/gel-core/columns/date-duration.cjs.map +1 -0
- package/gel-core/columns/date-duration.d.cts +23 -0
- package/gel-core/columns/date-duration.d.ts +23 -0
- package/gel-core/columns/date-duration.js +30 -0
- package/gel-core/columns/date-duration.js.map +1 -0
- package/gel-core/columns/date.common.cjs +37 -0
- package/gel-core/columns/date.common.cjs.map +1 -0
- package/gel-core/columns/date.common.d.cts +7 -0
- package/gel-core/columns/date.common.d.ts +7 -0
- package/gel-core/columns/date.common.js +13 -0
- package/gel-core/columns/date.common.js.map +1 -0
- package/gel-core/columns/decimal.cjs +56 -0
- package/gel-core/columns/decimal.cjs.map +1 -0
- package/gel-core/columns/decimal.d.cts +26 -0
- package/gel-core/columns/decimal.d.ts +26 -0
- package/gel-core/columns/decimal.js +30 -0
- package/gel-core/columns/decimal.js.map +1 -0
- package/gel-core/columns/double-precision.cjs +62 -0
- package/gel-core/columns/double-precision.cjs.map +1 -0
- package/gel-core/columns/double-precision.d.cts +23 -0
- package/gel-core/columns/double-precision.d.ts +23 -0
- package/gel-core/columns/double-precision.js +36 -0
- package/gel-core/columns/double-precision.js.map +1 -0
- package/gel-core/columns/duration.cjs +53 -0
- package/gel-core/columns/duration.cjs.map +1 -0
- package/gel-core/columns/duration.d.cts +23 -0
- package/gel-core/columns/duration.d.ts +23 -0
- package/gel-core/columns/duration.js +27 -0
- package/gel-core/columns/duration.js.map +1 -0
- package/gel-core/columns/index.cjs +65 -0
- package/gel-core/columns/index.cjs.map +1 -0
- package/gel-core/columns/index.d.cts +22 -0
- package/gel-core/columns/index.d.ts +22 -0
- package/gel-core/columns/index.js +23 -0
- package/gel-core/columns/index.js.map +1 -0
- package/gel-core/columns/int.common.cjs +67 -0
- package/gel-core/columns/int.common.cjs.map +1 -0
- package/gel-core/columns/int.common.d.cts +15 -0
- package/gel-core/columns/int.common.d.ts +15 -0
- package/gel-core/columns/int.common.js +43 -0
- package/gel-core/columns/int.common.js.map +1 -0
- package/gel-core/columns/integer.cjs +54 -0
- package/gel-core/columns/integer.cjs.map +1 -0
- package/gel-core/columns/integer.d.cts +23 -0
- package/gel-core/columns/integer.d.ts +23 -0
- package/gel-core/columns/integer.js +28 -0
- package/gel-core/columns/integer.js.map +1 -0
- package/gel-core/columns/json.cjs +56 -0
- package/gel-core/columns/json.cjs.map +1 -0
- package/gel-core/columns/json.d.cts +26 -0
- package/gel-core/columns/json.d.ts +26 -0
- package/gel-core/columns/json.js +30 -0
- package/gel-core/columns/json.js.map +1 -0
- package/gel-core/columns/localdate.cjs +57 -0
- package/gel-core/columns/localdate.cjs.map +1 -0
- package/gel-core/columns/localdate.d.cts +24 -0
- package/gel-core/columns/localdate.d.ts +24 -0
- package/gel-core/columns/localdate.js +31 -0
- package/gel-core/columns/localdate.js.map +1 -0
- package/gel-core/columns/localtime.cjs +57 -0
- package/gel-core/columns/localtime.cjs.map +1 -0
- package/gel-core/columns/localtime.d.cts +24 -0
- package/gel-core/columns/localtime.d.ts +24 -0
- package/gel-core/columns/localtime.js +31 -0
- package/gel-core/columns/localtime.js.map +1 -0
- package/gel-core/columns/real.cjs +57 -0
- package/gel-core/columns/real.cjs.map +1 -0
- package/gel-core/columns/real.d.cts +28 -0
- package/gel-core/columns/real.d.ts +28 -0
- package/gel-core/columns/real.js +31 -0
- package/gel-core/columns/real.js.map +1 -0
- package/gel-core/columns/relative-duration.cjs +56 -0
- package/gel-core/columns/relative-duration.cjs.map +1 -0
- package/gel-core/columns/relative-duration.d.cts +23 -0
- package/gel-core/columns/relative-duration.d.ts +23 -0
- package/gel-core/columns/relative-duration.js +30 -0
- package/gel-core/columns/relative-duration.js.map +1 -0
- package/gel-core/columns/smallint.cjs +54 -0
- package/gel-core/columns/smallint.cjs.map +1 -0
- package/gel-core/columns/smallint.d.cts +23 -0
- package/gel-core/columns/smallint.d.ts +23 -0
- package/gel-core/columns/smallint.js +28 -0
- package/gel-core/columns/smallint.js.map +1 -0
- package/gel-core/columns/text.cjs +54 -0
- package/gel-core/columns/text.cjs.map +1 -0
- package/gel-core/columns/text.d.cts +26 -0
- package/gel-core/columns/text.d.ts +26 -0
- package/gel-core/columns/text.js +28 -0
- package/gel-core/columns/text.js.map +1 -0
- package/gel-core/columns/timestamp.cjs +60 -0
- package/gel-core/columns/timestamp.cjs.map +1 -0
- package/gel-core/columns/timestamp.d.cts +28 -0
- package/gel-core/columns/timestamp.d.ts +28 -0
- package/gel-core/columns/timestamp.js +34 -0
- package/gel-core/columns/timestamp.js.map +1 -0
- package/gel-core/columns/timestamptz.cjs +60 -0
- package/gel-core/columns/timestamptz.cjs.map +1 -0
- package/gel-core/columns/timestamptz.d.cts +27 -0
- package/gel-core/columns/timestamptz.d.ts +27 -0
- package/gel-core/columns/timestamptz.js +34 -0
- package/gel-core/columns/timestamptz.js.map +1 -0
- package/gel-core/columns/uuid.cjs +53 -0
- package/gel-core/columns/uuid.cjs.map +1 -0
- package/gel-core/columns/uuid.d.cts +22 -0
- package/gel-core/columns/uuid.d.ts +22 -0
- package/gel-core/columns/uuid.js +27 -0
- package/gel-core/columns/uuid.js.map +1 -0
- package/gel-core/db.cjs +338 -0
- package/gel-core/db.cjs.map +1 -0
- package/gel-core/db.d.cts +281 -0
- package/gel-core/db.d.ts +281 -0
- package/gel-core/db.js +319 -0
- package/gel-core/db.js.map +1 -0
- package/gel-core/dialect.cjs +1142 -0
- package/gel-core/dialect.cjs.map +1 -0
- package/gel-core/dialect.d.cts +62 -0
- package/gel-core/dialect.d.ts +62 -0
- package/gel-core/dialect.js +1128 -0
- package/gel-core/dialect.js.map +1 -0
- package/gel-core/expressions.cjs +49 -0
- package/gel-core/expressions.cjs.map +1 -0
- package/gel-core/expressions.d.cts +8 -0
- package/gel-core/expressions.d.ts +8 -0
- package/gel-core/expressions.js +22 -0
- package/gel-core/expressions.js.map +1 -0
- package/gel-core/foreign-keys.cjs +100 -0
- package/gel-core/foreign-keys.cjs.map +1 -0
- package/gel-core/foreign-keys.d.cts +48 -0
- package/gel-core/foreign-keys.d.ts +48 -0
- package/gel-core/foreign-keys.js +74 -0
- package/gel-core/foreign-keys.js.map +1 -0
- package/gel-core/index.cjs +61 -0
- package/gel-core/index.cjs.map +1 -0
- package/gel-core/index.d.cts +20 -0
- package/gel-core/index.d.ts +20 -0
- package/gel-core/index.js +21 -0
- package/gel-core/index.js.map +1 -0
- package/gel-core/indexes.cjs +149 -0
- package/gel-core/indexes.cjs.map +1 -0
- package/gel-core/indexes.d.cts +79 -0
- package/gel-core/indexes.d.ts +79 -0
- package/gel-core/indexes.js +121 -0
- package/gel-core/indexes.js.map +1 -0
- package/gel-core/policies.cjs +58 -0
- package/gel-core/policies.cjs.map +1 -0
- package/gel-core/policies.d.cts +24 -0
- package/gel-core/policies.d.ts +24 -0
- package/gel-core/policies.js +33 -0
- package/gel-core/policies.js.map +1 -0
- package/gel-core/primary-keys.cjs +68 -0
- package/gel-core/primary-keys.cjs.map +1 -0
- package/gel-core/primary-keys.d.cts +30 -0
- package/gel-core/primary-keys.d.ts +30 -0
- package/gel-core/primary-keys.js +42 -0
- package/gel-core/primary-keys.js.map +1 -0
- package/gel-core/query-builders/count.cjs +73 -0
- package/gel-core/query-builders/count.cjs.map +1 -0
- package/gel-core/query-builders/count.d.cts +25 -0
- package/gel-core/query-builders/count.d.ts +25 -0
- package/gel-core/query-builders/count.js +49 -0
- package/gel-core/query-builders/count.js.map +1 -0
- package/gel-core/query-builders/delete.cjs +105 -0
- package/gel-core/query-builders/delete.cjs.map +1 -0
- package/gel-core/query-builders/delete.d.cts +99 -0
- package/gel-core/query-builders/delete.d.ts +99 -0
- package/gel-core/query-builders/delete.js +81 -0
- package/gel-core/query-builders/delete.js.map +1 -0
- package/gel-core/query-builders/index.cjs +35 -0
- package/gel-core/query-builders/index.cjs.map +1 -0
- package/gel-core/query-builders/index.d.cts +7 -0
- package/gel-core/query-builders/index.d.ts +7 -0
- package/gel-core/query-builders/index.js +8 -0
- package/gel-core/query-builders/index.js.map +1 -0
- package/gel-core/query-builders/insert.cjs +218 -0
- package/gel-core/query-builders/insert.cjs.map +1 -0
- package/gel-core/query-builders/insert.d.cts +116 -0
- package/gel-core/query-builders/insert.d.ts +116 -0
- package/gel-core/query-builders/insert.js +193 -0
- package/gel-core/query-builders/insert.js.map +1 -0
- package/gel-core/query-builders/query-builder.cjs +114 -0
- package/gel-core/query-builders/query-builder.cjs.map +1 -0
- package/gel-core/query-builders/query-builder.d.cts +40 -0
- package/gel-core/query-builders/query-builder.d.ts +40 -0
- package/gel-core/query-builders/query-builder.js +90 -0
- package/gel-core/query-builders/query-builder.js.map +1 -0
- package/gel-core/query-builders/query.cjs +139 -0
- package/gel-core/query-builders/query.cjs.map +1 -0
- package/gel-core/query-builders/query.d.cts +46 -0
- package/gel-core/query-builders/query.d.ts +46 -0
- package/gel-core/query-builders/query.js +116 -0
- package/gel-core/query-builders/query.js.map +1 -0
- package/gel-core/query-builders/raw.cjs +57 -0
- package/gel-core/query-builders/raw.cjs.map +1 -0
- package/gel-core/query-builders/raw.d.cts +22 -0
- package/gel-core/query-builders/raw.d.ts +22 -0
- package/gel-core/query-builders/raw.js +33 -0
- package/gel-core/query-builders/raw.js.map +1 -0
- package/gel-core/query-builders/refresh-materialized-view.cjs +77 -0
- package/gel-core/query-builders/refresh-materialized-view.cjs.map +1 -0
- package/gel-core/query-builders/refresh-materialized-view.d.cts +27 -0
- package/gel-core/query-builders/refresh-materialized-view.d.ts +27 -0
- package/gel-core/query-builders/refresh-materialized-view.js +53 -0
- package/gel-core/query-builders/refresh-materialized-view.js.map +1 -0
- package/gel-core/query-builders/select.cjs +775 -0
- package/gel-core/query-builders/select.cjs.map +1 -0
- package/gel-core/query-builders/select.d.cts +721 -0
- package/gel-core/query-builders/select.d.ts +721 -0
- package/gel-core/query-builders/select.js +748 -0
- package/gel-core/query-builders/select.js.map +1 -0
- package/gel-core/query-builders/select.types.cjs +17 -0
- package/gel-core/query-builders/select.types.cjs.map +1 -0
- package/gel-core/query-builders/select.types.d.cts +138 -0
- package/gel-core/query-builders/select.types.d.ts +138 -0
- package/gel-core/query-builders/select.types.js +1 -0
- package/gel-core/query-builders/select.types.js.map +1 -0
- package/gel-core/query-builders/update.cjs +226 -0
- package/gel-core/query-builders/update.cjs.map +1 -0
- package/gel-core/query-builders/update.d.cts +166 -0
- package/gel-core/query-builders/update.d.ts +166 -0
- package/gel-core/query-builders/update.js +205 -0
- package/gel-core/query-builders/update.js.map +1 -0
- package/gel-core/roles.cjs +57 -0
- package/gel-core/roles.cjs.map +1 -0
- package/gel-core/roles.d.cts +13 -0
- package/gel-core/roles.d.ts +13 -0
- package/gel-core/roles.js +32 -0
- package/gel-core/roles.js.map +1 -0
- package/gel-core/schema.cjs +74 -0
- package/gel-core/schema.cjs.map +1 -0
- package/gel-core/schema.d.cts +15 -0
- package/gel-core/schema.d.ts +15 -0
- package/gel-core/schema.js +48 -0
- package/gel-core/schema.js.map +1 -0
- package/gel-core/sequence.cjs +52 -0
- package/gel-core/sequence.cjs.map +1 -0
- package/gel-core/sequence.d.cts +18 -0
- package/gel-core/sequence.d.ts +18 -0
- package/gel-core/sequence.js +25 -0
- package/gel-core/sequence.js.map +1 -0
- package/gel-core/session.cjs +94 -0
- package/gel-core/session.cjs.map +1 -0
- package/gel-core/session.d.cts +56 -0
- package/gel-core/session.d.ts +56 -0
- package/gel-core/session.js +68 -0
- package/gel-core/session.js.map +1 -0
- package/gel-core/subquery.cjs +17 -0
- package/gel-core/subquery.cjs.map +1 -0
- package/gel-core/subquery.d.cts +5 -0
- package/gel-core/subquery.d.ts +5 -0
- package/gel-core/subquery.js +1 -0
- package/gel-core/subquery.js.map +1 -0
- package/gel-core/table.cjs +100 -0
- package/gel-core/table.cjs.map +1 -0
- package/gel-core/table.d.cts +95 -0
- package/gel-core/table.d.ts +95 -0
- package/gel-core/table.js +71 -0
- package/gel-core/table.js.map +1 -0
- package/gel-core/unique-constraint.cjs +89 -0
- package/gel-core/unique-constraint.cjs.map +1 -0
- package/gel-core/unique-constraint.d.cts +25 -0
- package/gel-core/unique-constraint.d.ts +25 -0
- package/gel-core/unique-constraint.js +61 -0
- package/gel-core/unique-constraint.js.map +1 -0
- package/gel-core/utils.cjs +100 -0
- package/gel-core/utils.cjs.map +1 -0
- package/gel-core/utils.d.cts +51 -0
- package/gel-core/utils.d.ts +51 -0
- package/gel-core/utils.js +74 -0
- package/gel-core/utils.js.map +1 -0
- package/gel-core/view-base.cjs +33 -0
- package/gel-core/view-base.cjs.map +1 -0
- package/gel-core/view-base.d.cts +8 -0
- package/gel-core/view-base.d.ts +8 -0
- package/gel-core/view-base.js +9 -0
- package/gel-core/view-base.js.map +1 -0
- package/gel-core/view-common.cjs +29 -0
- package/gel-core/view-common.cjs.map +1 -0
- package/gel-core/view-common.d.cts +1 -0
- package/gel-core/view-common.d.ts +1 -0
- package/gel-core/view-common.js +5 -0
- package/gel-core/view-common.js.map +1 -0
- package/gel-core/view.cjs +302 -0
- package/gel-core/view.cjs.map +1 -0
- package/gel-core/view.d.cts +150 -0
- package/gel-core/view.d.ts +150 -0
- package/gel-core/view.js +268 -0
- package/gel-core/view.js.map +1 -0
- package/package.json +795 -50
- package/pg-core/table.cjs +2 -0
- package/pg-core/table.cjs.map +1 -1
- package/pg-core/table.js +2 -0
- package/pg-core/table.js.map +1 -1
- package/table.cjs.map +1 -1
- package/table.js.map +1 -1
- package/version.cjs +1 -1
- package/version.d.cts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var timestamp_exports = {};
|
|
20
|
+
__export(timestamp_exports, {
|
|
21
|
+
GelTimestamp: () => GelTimestamp,
|
|
22
|
+
GelTimestampBuilder: () => GelTimestampBuilder,
|
|
23
|
+
timestamp: () => timestamp
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(timestamp_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_common = require("./common.cjs");
|
|
28
|
+
var import_date_common = require("./date.common.cjs");
|
|
29
|
+
class GelTimestampBuilder extends import_date_common.GelLocalDateColumnBaseBuilder {
|
|
30
|
+
static [import_entity.entityKind] = "GelTimestampBuilder";
|
|
31
|
+
constructor(name) {
|
|
32
|
+
super(name, "localDateTime", "GelTimestamp");
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
build(table) {
|
|
36
|
+
return new GelTimestamp(
|
|
37
|
+
table,
|
|
38
|
+
this.config
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class GelTimestamp extends import_common.GelColumn {
|
|
43
|
+
static [import_entity.entityKind] = "GelTimestamp";
|
|
44
|
+
constructor(table, config) {
|
|
45
|
+
super(table, config);
|
|
46
|
+
}
|
|
47
|
+
getSQLType() {
|
|
48
|
+
return "cal::local_datetime";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function timestamp(name) {
|
|
52
|
+
return new GelTimestampBuilder(name ?? "");
|
|
53
|
+
}
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
GelTimestamp,
|
|
57
|
+
GelTimestampBuilder,
|
|
58
|
+
timestamp
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=timestamp.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/gel-core/columns/timestamp.ts"],"sourcesContent":["import type { LocalDateTime } from 'gel';\nimport type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn } from './common.ts';\nimport { GelLocalDateColumnBaseBuilder } from './date.common.ts';\n\nexport type GelTimestampBuilderInitial<TName extends string> = GelTimestampBuilder<{\n\tname: TName;\n\tdataType: 'localDateTime';\n\tcolumnType: 'GelTimestamp';\n\tdata: LocalDateTime;\n\tdriverParam: LocalDateTime;\n\tenumValues: undefined;\n}>;\n\nexport class GelTimestampBuilder<T extends ColumnBuilderBaseConfig<'localDateTime', 'GelTimestamp'>>\n\textends GelLocalDateColumnBaseBuilder<\n\t\tT\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'GelTimestampBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'localDateTime', 'GelTimestamp');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelTimestamp<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelTimestamp<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class GelTimestamp<T extends ColumnBaseConfig<'localDateTime', 'GelTimestamp'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelTimestamp';\n\n\tconstructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelTimestampBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'cal::local_datetime';\n\t}\n}\n\nexport function timestamp(): GelTimestampBuilderInitial<''>;\nexport function timestamp<TName extends string>(\n\tname: TName,\n): GelTimestampBuilderInitial<TName>;\nexport function timestamp(name?: string) {\n\treturn new GelTimestampBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA2B;AAE3B,oBAA0B;AAC1B,yBAA8C;AAWvC,MAAM,4BACJ,iDAGT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,iBAAiB,cAAc;AAAA,EAC5C;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBAAkF,wBAAa;AAAA,EAC3G,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,OAA8C,QAA0C;AACnG,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAMO,SAAS,UAAU,MAAe;AACxC,SAAO,IAAI,oBAAoB,QAAQ,EAAE;AAC1C;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
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>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LocalDateTime } from 'gel';
|
|
2
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
3
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
4
|
+
import { entityKind } from "../../entity.js";
|
|
5
|
+
import type { AnyGelTable } from "../table.js";
|
|
6
|
+
import { GelColumn } from "./common.js";
|
|
7
|
+
import { GelLocalDateColumnBaseBuilder } from "./date.common.js";
|
|
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>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { GelColumn } from "./common.js";
|
|
3
|
+
import { GelLocalDateColumnBaseBuilder } from "./date.common.js";
|
|
4
|
+
class GelTimestampBuilder extends GelLocalDateColumnBaseBuilder {
|
|
5
|
+
static [entityKind] = "GelTimestampBuilder";
|
|
6
|
+
constructor(name) {
|
|
7
|
+
super(name, "localDateTime", "GelTimestamp");
|
|
8
|
+
}
|
|
9
|
+
/** @internal */
|
|
10
|
+
build(table) {
|
|
11
|
+
return new GelTimestamp(
|
|
12
|
+
table,
|
|
13
|
+
this.config
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class GelTimestamp extends GelColumn {
|
|
18
|
+
static [entityKind] = "GelTimestamp";
|
|
19
|
+
constructor(table, config) {
|
|
20
|
+
super(table, config);
|
|
21
|
+
}
|
|
22
|
+
getSQLType() {
|
|
23
|
+
return "cal::local_datetime";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function timestamp(name) {
|
|
27
|
+
return new GelTimestampBuilder(name ?? "");
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
GelTimestamp,
|
|
31
|
+
GelTimestampBuilder,
|
|
32
|
+
timestamp
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=timestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/gel-core/columns/timestamp.ts"],"sourcesContent":["import type { LocalDateTime } from 'gel';\nimport type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn } from './common.ts';\nimport { GelLocalDateColumnBaseBuilder } from './date.common.ts';\n\nexport type GelTimestampBuilderInitial<TName extends string> = GelTimestampBuilder<{\n\tname: TName;\n\tdataType: 'localDateTime';\n\tcolumnType: 'GelTimestamp';\n\tdata: LocalDateTime;\n\tdriverParam: LocalDateTime;\n\tenumValues: undefined;\n}>;\n\nexport class GelTimestampBuilder<T extends ColumnBuilderBaseConfig<'localDateTime', 'GelTimestamp'>>\n\textends GelLocalDateColumnBaseBuilder<\n\t\tT\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'GelTimestampBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'localDateTime', 'GelTimestamp');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelTimestamp<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelTimestamp<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class GelTimestamp<T extends ColumnBaseConfig<'localDateTime', 'GelTimestamp'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelTimestamp';\n\n\tconstructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelTimestampBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'cal::local_datetime';\n\t}\n}\n\nexport function timestamp(): GelTimestampBuilderInitial<''>;\nexport function timestamp<TName extends string>(\n\tname: TName,\n): GelTimestampBuilderInitial<TName>;\nexport function timestamp(name?: string) {\n\treturn new GelTimestampBuilder(name ?? '');\n}\n"],"mappings":"AAGA,SAAS,kBAAkB;AAE3B,SAAS,iBAAiB;AAC1B,SAAS,qCAAqC;AAWvC,MAAM,4BACJ,8BAGT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,iBAAiB,cAAc;AAAA,EAC5C;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBAAkF,UAAa;AAAA,EAC3G,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,OAA8C,QAA0C;AACnG,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAMO,SAAS,UAAU,MAAe;AACxC,SAAO,IAAI,oBAAoB,QAAQ,EAAE;AAC1C;","names":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var timestamptz_exports = {};
|
|
20
|
+
__export(timestamptz_exports, {
|
|
21
|
+
GelTimestampTz: () => GelTimestampTz,
|
|
22
|
+
GelTimestampTzBuilder: () => GelTimestampTzBuilder,
|
|
23
|
+
timestamptz: () => timestamptz
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(timestamptz_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_common = require("./common.cjs");
|
|
28
|
+
var import_date_common = require("./date.common.cjs");
|
|
29
|
+
class GelTimestampTzBuilder extends import_date_common.GelLocalDateColumnBaseBuilder {
|
|
30
|
+
static [import_entity.entityKind] = "GelTimestampTzBuilder";
|
|
31
|
+
constructor(name) {
|
|
32
|
+
super(name, "date", "GelTimestampTz");
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
build(table) {
|
|
36
|
+
return new GelTimestampTz(
|
|
37
|
+
table,
|
|
38
|
+
this.config
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class GelTimestampTz extends import_common.GelColumn {
|
|
43
|
+
static [import_entity.entityKind] = "GelTimestampTz";
|
|
44
|
+
constructor(table, config) {
|
|
45
|
+
super(table, config);
|
|
46
|
+
}
|
|
47
|
+
getSQLType() {
|
|
48
|
+
return "datetime";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function timestamptz(name) {
|
|
52
|
+
return new GelTimestampTzBuilder(name ?? "");
|
|
53
|
+
}
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
GelTimestampTz,
|
|
57
|
+
GelTimestampTzBuilder,
|
|
58
|
+
timestamptz
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=timestamptz.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/gel-core/columns/timestamptz.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn } from './common.ts';\nimport { GelLocalDateColumnBaseBuilder } from './date.common.ts';\n\nexport type GelTimestampTzBuilderInitial<TName extends string> = GelTimestampTzBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'GelTimestampTz';\n\tdata: Date;\n\tdriverParam: Date;\n\tenumValues: undefined;\n}>;\n\nexport class GelTimestampTzBuilder<T extends ColumnBuilderBaseConfig<'date', 'GelTimestampTz'>>\n\textends GelLocalDateColumnBaseBuilder<\n\t\tT\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'GelTimestampTzBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'date', 'GelTimestampTz');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelTimestampTz<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelTimestampTz<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class GelTimestampTz<T extends ColumnBaseConfig<'date', 'GelTimestampTz'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelTimestampTz';\n\n\tconstructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelTimestampTzBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'datetime';\n\t}\n}\n\nexport function timestamptz(): GelTimestampTzBuilderInitial<''>;\nexport function timestamptz<TName extends string>(\n\tname: TName,\n): GelTimestampTzBuilderInitial<TName>;\nexport function timestamptz(name?: string) {\n\treturn new GelTimestampTzBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA0B;AAC1B,yBAA8C;AAWvC,MAAM,8BACJ,iDAGT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,QAAQ,gBAAgB;AAAA,EACrC;AAAA;AAAA,EAGS,MACR,OACkD;AAClD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,uBAA6E,wBAAa;AAAA,EACtG,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,OAA8C,QAA4C;AACrG,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAMO,SAAS,YAAY,MAAe;AAC1C,SAAO,IAAI,sBAAsB,QAAQ,EAAE;AAC5C;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import type { AnyGelTable } from "../table.cjs";
|
|
5
|
+
import { GelColumn } from "./common.cjs";
|
|
6
|
+
import { GelLocalDateColumnBaseBuilder } from "./date.common.cjs";
|
|
7
|
+
export type GelTimestampTzBuilderInitial<TName extends string> = GelTimestampTzBuilder<{
|
|
8
|
+
name: TName;
|
|
9
|
+
dataType: 'date';
|
|
10
|
+
columnType: 'GelTimestampTz';
|
|
11
|
+
data: Date;
|
|
12
|
+
driverParam: Date;
|
|
13
|
+
enumValues: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class GelTimestampTzBuilder<T extends ColumnBuilderBaseConfig<'date', 'GelTimestampTz'>> extends GelLocalDateColumnBaseBuilder<T> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name']);
|
|
18
|
+
}
|
|
19
|
+
export declare class GelTimestampTz<T extends ColumnBaseConfig<'date', 'GelTimestampTz'>> extends GelColumn<T> {
|
|
20
|
+
static readonly [entityKind]: string;
|
|
21
|
+
constructor(table: AnyGelTable<{
|
|
22
|
+
name: T['tableName'];
|
|
23
|
+
}>, config: GelTimestampTzBuilder<T>['config']);
|
|
24
|
+
getSQLType(): string;
|
|
25
|
+
}
|
|
26
|
+
export declare function timestamptz(): GelTimestampTzBuilderInitial<''>;
|
|
27
|
+
export declare function timestamptz<TName extends string>(name: TName): GelTimestampTzBuilderInitial<TName>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
3
|
+
import { entityKind } from "../../entity.js";
|
|
4
|
+
import type { AnyGelTable } from "../table.js";
|
|
5
|
+
import { GelColumn } from "./common.js";
|
|
6
|
+
import { GelLocalDateColumnBaseBuilder } from "./date.common.js";
|
|
7
|
+
export type GelTimestampTzBuilderInitial<TName extends string> = GelTimestampTzBuilder<{
|
|
8
|
+
name: TName;
|
|
9
|
+
dataType: 'date';
|
|
10
|
+
columnType: 'GelTimestampTz';
|
|
11
|
+
data: Date;
|
|
12
|
+
driverParam: Date;
|
|
13
|
+
enumValues: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class GelTimestampTzBuilder<T extends ColumnBuilderBaseConfig<'date', 'GelTimestampTz'>> extends GelLocalDateColumnBaseBuilder<T> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name']);
|
|
18
|
+
}
|
|
19
|
+
export declare class GelTimestampTz<T extends ColumnBaseConfig<'date', 'GelTimestampTz'>> extends GelColumn<T> {
|
|
20
|
+
static readonly [entityKind]: string;
|
|
21
|
+
constructor(table: AnyGelTable<{
|
|
22
|
+
name: T['tableName'];
|
|
23
|
+
}>, config: GelTimestampTzBuilder<T>['config']);
|
|
24
|
+
getSQLType(): string;
|
|
25
|
+
}
|
|
26
|
+
export declare function timestamptz(): GelTimestampTzBuilderInitial<''>;
|
|
27
|
+
export declare function timestamptz<TName extends string>(name: TName): GelTimestampTzBuilderInitial<TName>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { GelColumn } from "./common.js";
|
|
3
|
+
import { GelLocalDateColumnBaseBuilder } from "./date.common.js";
|
|
4
|
+
class GelTimestampTzBuilder extends GelLocalDateColumnBaseBuilder {
|
|
5
|
+
static [entityKind] = "GelTimestampTzBuilder";
|
|
6
|
+
constructor(name) {
|
|
7
|
+
super(name, "date", "GelTimestampTz");
|
|
8
|
+
}
|
|
9
|
+
/** @internal */
|
|
10
|
+
build(table) {
|
|
11
|
+
return new GelTimestampTz(
|
|
12
|
+
table,
|
|
13
|
+
this.config
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class GelTimestampTz extends GelColumn {
|
|
18
|
+
static [entityKind] = "GelTimestampTz";
|
|
19
|
+
constructor(table, config) {
|
|
20
|
+
super(table, config);
|
|
21
|
+
}
|
|
22
|
+
getSQLType() {
|
|
23
|
+
return "datetime";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function timestamptz(name) {
|
|
27
|
+
return new GelTimestampTzBuilder(name ?? "");
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
GelTimestampTz,
|
|
31
|
+
GelTimestampTzBuilder,
|
|
32
|
+
timestamptz
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=timestamptz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/gel-core/columns/timestamptz.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn } from './common.ts';\nimport { GelLocalDateColumnBaseBuilder } from './date.common.ts';\n\nexport type GelTimestampTzBuilderInitial<TName extends string> = GelTimestampTzBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'GelTimestampTz';\n\tdata: Date;\n\tdriverParam: Date;\n\tenumValues: undefined;\n}>;\n\nexport class GelTimestampTzBuilder<T extends ColumnBuilderBaseConfig<'date', 'GelTimestampTz'>>\n\textends GelLocalDateColumnBaseBuilder<\n\t\tT\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'GelTimestampTzBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'date', 'GelTimestampTz');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelTimestampTz<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelTimestampTz<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class GelTimestampTz<T extends ColumnBaseConfig<'date', 'GelTimestampTz'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelTimestampTz';\n\n\tconstructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelTimestampTzBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'datetime';\n\t}\n}\n\nexport function timestamptz(): GelTimestampTzBuilderInitial<''>;\nexport function timestamptz<TName extends string>(\n\tname: TName,\n): GelTimestampTzBuilderInitial<TName>;\nexport function timestamptz(name?: string) {\n\treturn new GelTimestampTzBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,iBAAiB;AAC1B,SAAS,qCAAqC;AAWvC,MAAM,8BACJ,8BAGT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,QAAQ,gBAAgB;AAAA,EACrC;AAAA;AAAA,EAGS,MACR,OACkD;AAClD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,uBAA6E,UAAa;AAAA,EACtG,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,OAA8C,QAA4C;AACrG,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAMO,SAAS,YAAY,MAAe;AAC1C,SAAO,IAAI,sBAAsB,QAAQ,EAAE;AAC5C;","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var uuid_exports = {};
|
|
20
|
+
__export(uuid_exports, {
|
|
21
|
+
GelUUID: () => GelUUID,
|
|
22
|
+
GelUUIDBuilder: () => GelUUIDBuilder,
|
|
23
|
+
uuid: () => uuid
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(uuid_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_common = require("./common.cjs");
|
|
28
|
+
class GelUUIDBuilder extends import_common.GelColumnBuilder {
|
|
29
|
+
static [import_entity.entityKind] = "GelUUIDBuilder";
|
|
30
|
+
constructor(name) {
|
|
31
|
+
super(name, "string", "GelUUID");
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
build(table) {
|
|
35
|
+
return new GelUUID(table, this.config);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
class GelUUID extends import_common.GelColumn {
|
|
39
|
+
static [import_entity.entityKind] = "GelUUID";
|
|
40
|
+
getSQLType() {
|
|
41
|
+
return "uuid";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function uuid(name) {
|
|
45
|
+
return new GelUUIDBuilder(name ?? "");
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
GelUUID,
|
|
50
|
+
GelUUIDBuilder,
|
|
51
|
+
uuid
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=uuid.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/gel-core/columns/uuid.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelUUIDBuilderInitial<TName extends string> = GelUUIDBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'GelUUID';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class GelUUIDBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelUUID'>> extends GelColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'GelUUIDBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'GelUUID');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelUUID<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelUUID<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelUUID<T extends ColumnBaseConfig<'string', 'GelUUID'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelUUID';\n\n\tgetSQLType(): string {\n\t\treturn 'uuid';\n\t}\n}\n\nexport function uuid(): GelUUIDBuilderInitial<''>;\nexport function uuid<TName extends string>(name: TName): GelUUIDBuilderInitial<TName>;\nexport function uuid(name?: string) {\n\treturn new GelUUIDBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA4C;AAWrC,MAAM,uBAA+E,+BAAoB;AAAA,EAC/G,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,SAAS;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC2C;AAC3C,WAAO,IAAI,QAAyC,OAAO,KAAK,MAA8C;AAAA,EAC/G;AACD;AAEO,MAAM,gBAAiE,wBAAa;AAAA,EAC1F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,eAAe,QAAQ,EAAE;AACrC;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import { GelColumn, GelColumnBuilder } from "./common.cjs";
|
|
5
|
+
export type GelUUIDBuilderInitial<TName extends string> = GelUUIDBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'string';
|
|
8
|
+
columnType: 'GelUUID';
|
|
9
|
+
data: string;
|
|
10
|
+
driverParam: string;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare class GelUUIDBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelUUID'>> extends GelColumnBuilder<T> {
|
|
14
|
+
static readonly [entityKind]: string;
|
|
15
|
+
constructor(name: T['name']);
|
|
16
|
+
}
|
|
17
|
+
export declare class GelUUID<T extends ColumnBaseConfig<'string', 'GelUUID'>> extends GelColumn<T> {
|
|
18
|
+
static readonly [entityKind]: string;
|
|
19
|
+
getSQLType(): string;
|
|
20
|
+
}
|
|
21
|
+
export declare function uuid(): GelUUIDBuilderInitial<''>;
|
|
22
|
+
export declare function uuid<TName extends string>(name: TName): GelUUIDBuilderInitial<TName>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
3
|
+
import { entityKind } from "../../entity.js";
|
|
4
|
+
import { GelColumn, GelColumnBuilder } from "./common.js";
|
|
5
|
+
export type GelUUIDBuilderInitial<TName extends string> = GelUUIDBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'string';
|
|
8
|
+
columnType: 'GelUUID';
|
|
9
|
+
data: string;
|
|
10
|
+
driverParam: string;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare class GelUUIDBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelUUID'>> extends GelColumnBuilder<T> {
|
|
14
|
+
static readonly [entityKind]: string;
|
|
15
|
+
constructor(name: T['name']);
|
|
16
|
+
}
|
|
17
|
+
export declare class GelUUID<T extends ColumnBaseConfig<'string', 'GelUUID'>> extends GelColumn<T> {
|
|
18
|
+
static readonly [entityKind]: string;
|
|
19
|
+
getSQLType(): string;
|
|
20
|
+
}
|
|
21
|
+
export declare function uuid(): GelUUIDBuilderInitial<''>;
|
|
22
|
+
export declare function uuid<TName extends string>(name: TName): GelUUIDBuilderInitial<TName>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { GelColumn, GelColumnBuilder } from "./common.js";
|
|
3
|
+
class GelUUIDBuilder extends GelColumnBuilder {
|
|
4
|
+
static [entityKind] = "GelUUIDBuilder";
|
|
5
|
+
constructor(name) {
|
|
6
|
+
super(name, "string", "GelUUID");
|
|
7
|
+
}
|
|
8
|
+
/** @internal */
|
|
9
|
+
build(table) {
|
|
10
|
+
return new GelUUID(table, this.config);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class GelUUID extends GelColumn {
|
|
14
|
+
static [entityKind] = "GelUUID";
|
|
15
|
+
getSQLType() {
|
|
16
|
+
return "uuid";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function uuid(name) {
|
|
20
|
+
return new GelUUIDBuilder(name ?? "");
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
GelUUID,
|
|
24
|
+
GelUUIDBuilder,
|
|
25
|
+
uuid
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=uuid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/gel-core/columns/uuid.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelUUIDBuilderInitial<TName extends string> = GelUUIDBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'GelUUID';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class GelUUIDBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelUUID'>> extends GelColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'GelUUIDBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'GelUUID');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelUUID<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelUUID<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelUUID<T extends ColumnBaseConfig<'string', 'GelUUID'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelUUID';\n\n\tgetSQLType(): string {\n\t\treturn 'uuid';\n\t}\n}\n\nexport function uuid(): GelUUIDBuilderInitial<''>;\nexport function uuid<TName extends string>(name: TName): GelUUIDBuilderInitial<TName>;\nexport function uuid(name?: string) {\n\treturn new GelUUIDBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,WAAW,wBAAwB;AAWrC,MAAM,uBAA+E,iBAAoB;AAAA,EAC/G,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,SAAS;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC2C;AAC3C,WAAO,IAAI,QAAyC,OAAO,KAAK,MAA8C;AAAA,EAC/G;AACD;AAEO,MAAM,gBAAiE,UAAa;AAAA,EAC1F,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,eAAe,QAAQ,EAAE;AACrC;","names":[]}
|