@prisma/orm-target-sqlite 8.0.0-rc.25-dev.23 → 8.0.0-rc.25-dev.25
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/dist/{adapter-CLQMz42P.d.mts → adapter-BQZBUROY.d.mts} +4 -4
- package/dist/{adapter-CLQMz42P.d.mts.map → adapter-BQZBUROY.d.mts.map} +1 -1
- package/dist/{adapter-CxzIV2_z-BBps74Fk.mjs → adapter-CxzIV2_z-DKbo2Ebu.mjs} +7 -7
- package/dist/{adapter-CxzIV2_z-BBps74Fk.mjs.map → adapter-CxzIV2_z-DKbo2Ebu.mjs.map} +1 -1
- package/dist/adapter.d.mts +1 -1
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.mjs +4 -4
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{aggregates-CA7Idm1d.d.mts → aggregates--0FaH9Te.d.mts} +4 -4
- package/dist/{aggregates-CA7Idm1d.d.mts.map → aggregates--0FaH9Te.d.mts.map} +1 -1
- package/dist/{codecs-EhvrdV8v.mjs → codecs-BO3frExA.mjs} +2 -2
- package/dist/{codecs-EhvrdV8v.mjs.map → codecs-BO3frExA.mjs.map} +1 -1
- package/dist/{codecs-CE5McdzP-CZ5F4Trz.mjs → codecs-izq9l1NG-Bb2RnXsx.mjs} +3 -3
- package/dist/{codecs-CE5McdzP-CZ5F4Trz.mjs.map → codecs-izq9l1NG-Bb2RnXsx.mjs.map} +1 -1
- package/dist/{contract-free-CJlg0xGJ.mjs → contract-free-B5S1OSEd.mjs} +2 -2
- package/dist/{contract-free-CJlg0xGJ.mjs.map → contract-free-B5S1OSEd.mjs.map} +1 -1
- package/dist/{data-type-entries-C0WkKiPF-CKPYj4OT.mjs → data-type-entries-DaT4D2GV-DE0V_N6k.mjs} +3 -3
- package/dist/{data-type-entries-C0WkKiPF-CKPYj4OT.mjs.map → data-type-entries-DaT4D2GV-DE0V_N6k.mjs.map} +1 -1
- package/dist/{data-types-C_NKe4Ni-D7r8QkSb.mjs → data-types-Djvapurb-BR-Y4NWN.mjs} +6 -3
- package/dist/data-types-Djvapurb-BR-Y4NWN.mjs.map +1 -0
- package/dist/{date-time-now-generators-DtRz9c2R-BkrBeLl2.mjs → date-time-now-generators-DUb3x91B-D0keGG59.mjs} +3 -3
- package/dist/{date-time-now-generators-DtRz9c2R-BkrBeLl2.mjs.map → date-time-now-generators-DUb3x91B-D0keGG59.mjs.map} +1 -1
- package/dist/{datetime-text-nkVy_w0q-DZnIEmgr.mjs → datetime-text-DPjoF6HJ-se0mLEbc.mjs} +3 -3
- package/dist/{datetime-text-nkVy_w0q-DZnIEmgr.mjs.map → datetime-text-DPjoF6HJ-se0mLEbc.mjs.map} +1 -1
- package/dist/{default-normalizer-Xsys5QJm-bPQiHGKp.mjs → default-normalizer-BANdMVGr-BiUHyBX1.mjs} +3 -3
- package/dist/{default-normalizer-Xsys5QJm-bPQiHGKp.mjs.map → default-normalizer-BANdMVGr-BiUHyBX1.mjs.map} +1 -1
- package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs → descriptor-meta-CafFMPhN-x3YQXDSX.mjs} +2 -2
- package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs.map → descriptor-meta-CafFMPhN-x3YQXDSX.mjs.map} +1 -1
- package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs → descriptor-meta-DEr1ALec-DvT6glGq.mjs} +5 -5
- package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs.map → descriptor-meta-DEr1ALec-DvT6glGq.mjs.map} +1 -1
- package/dist/driver__runtime.mjs +1 -1
- package/dist/{migration-BZoV6EvH.mjs → migration-BYRMZiPU.mjs} +2 -2
- package/dist/{migration-BZoV6EvH.mjs.map → migration-BYRMZiPU.mjs.map} +1 -1
- package/dist/{op-factory-call-2IWWs4es-CajfeAMX.mjs → op-factory-call-DjbjegGT-DsQBI5Ll.mjs} +9 -6
- package/dist/op-factory-call-DjbjegGT-DsQBI5Ll.mjs.map +1 -0
- package/dist/{pack-CHESErO8.d.mts → pack-BG5STIN9.d.mts} +2 -2
- package/dist/{pack-CHESErO8.d.mts.map → pack-BG5STIN9.d.mts.map} +1 -1
- package/dist/{planner-B3kx0r5b-ByQSd1xn.mjs → planner-C1OMkqV5-BAv-WPw6.mjs} +5 -5
- package/dist/{planner-B3kx0r5b-ByQSd1xn.mjs.map → planner-C1OMkqV5-BAv-WPw6.mjs.map} +1 -1
- package/dist/{planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs → planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs} +5 -5
- package/dist/{planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs.map → planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs.map} +1 -1
- package/dist/{render-ops-BdrBMvjY-CyVOYy9i.mjs → render-ops-CQ-Kf4P0-DDUU4OFY.mjs} +3 -3
- package/dist/{render-ops-BdrBMvjY-CyVOYy9i.mjs.map → render-ops-CQ-Kf4P0-DDUU4OFY.mjs.map} +1 -1
- package/dist/{runtime-DQll1Swl.mjs → runtime-C43fN_cJ.mjs} +2 -2
- package/dist/{runtime-DQll1Swl.mjs.map → runtime-C43fN_cJ.mjs.map} +1 -1
- package/dist/{runtime-JuCbuSJz.d.mts → runtime-DqzT70C4.d.mts} +2 -2
- package/dist/{runtime-JuCbuSJz.d.mts.map → runtime-DqzT70C4.d.mts.map} +1 -1
- package/dist/{sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs → sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs} +4 -4
- package/dist/sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs.map +1 -0
- package/dist/{sqlite-migration-BNMabSfq-C-TEN2jV.mjs → sqlite-migration-Cmzykasm--GxBXXny.mjs} +7 -7
- package/dist/{sqlite-migration-BNMabSfq-C-TEN2jV.mjs.map → sqlite-migration-Cmzykasm--GxBXXny.mjs.map} +1 -1
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +17 -17
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__codecs.mjs +3 -3
- package/dist/target__contract-free.mjs +1 -1
- package/dist/target__control.mjs +28 -8
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__default-normalizer.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__runtime.d.mts +1 -1
- package/dist/target__runtime.mjs +3 -3
- package/package.json +13 -13
- package/dist/data-types-C_NKe4Ni-D7r8QkSb.mjs.map +0 -1
- package/dist/op-factory-call-2IWWs4es-CajfeAMX.mjs.map +0 -1
- package/dist/sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs.map +0 -1
|
@@ -69,7 +69,7 @@ declare const sqliteAggregateDescriptors: readonly [{
|
|
|
69
69
|
readonly operation: "avg";
|
|
70
70
|
readonly input: {
|
|
71
71
|
readonly kind: "codec";
|
|
72
|
-
readonly codecId: "sql/int@1" | "sql/float@1" | "sqlite/integer@1" | "sqlite/
|
|
72
|
+
readonly codecId: "sql/int@1" | "sql/float@1" | "sqlite/integer@1" | "sqlite/real@1" | "sqlite/bigint@1" | "sqlite/bigintnumber@1";
|
|
73
73
|
};
|
|
74
74
|
readonly output: {
|
|
75
75
|
readonly kind: "codec";
|
|
@@ -100,7 +100,7 @@ declare const sqliteAggregateDescriptors: readonly [{
|
|
|
100
100
|
readonly operation: "min";
|
|
101
101
|
readonly input: {
|
|
102
102
|
readonly kind: "codec";
|
|
103
|
-
readonly codecId: "sqlite/blob@1" | "sqlite/
|
|
103
|
+
readonly codecId: "sqlite/blob@1" | "sqlite/datetime@1" | "sqlite/json@1" | "sqlite/datetime-temporal@1" | "sqlite/datetime-string@1" | "sqlite/date-string@1" | "sqlite/date-temporal@1" | "sqlite/time-string@1" | "sqlite/time-temporal@1";
|
|
104
104
|
};
|
|
105
105
|
readonly output: {
|
|
106
106
|
readonly kind: "self";
|
|
@@ -141,7 +141,7 @@ declare const sqliteAggregateDescriptors: readonly [{
|
|
|
141
141
|
readonly operation: "max";
|
|
142
142
|
readonly input: {
|
|
143
143
|
readonly kind: "codec";
|
|
144
|
-
readonly codecId: "sqlite/blob@1" | "sqlite/
|
|
144
|
+
readonly codecId: "sqlite/blob@1" | "sqlite/datetime@1" | "sqlite/json@1" | "sqlite/datetime-temporal@1" | "sqlite/datetime-string@1" | "sqlite/date-string@1" | "sqlite/date-temporal@1" | "sqlite/time-string@1" | "sqlite/time-temporal@1";
|
|
145
145
|
};
|
|
146
146
|
readonly output: {
|
|
147
147
|
readonly kind: "self";
|
|
@@ -161,4 +161,4 @@ declare const sqliteAggregateDescriptors: readonly [{
|
|
|
161
161
|
}];
|
|
162
162
|
//#endregion
|
|
163
163
|
export { sqliteAggregateDescriptors as t };
|
|
164
|
-
//# sourceMappingURL=aggregates
|
|
164
|
+
//# sourceMappingURL=aggregates--0FaH9Te.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregates
|
|
1
|
+
{"version":3,"file":"aggregates--0FaH9Te.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/aggregates.d.mts"],"mappings":";;;;;;cAKc;WACH;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP,QAAQ;WACR;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA,OAAO;;WAEP,QAAQ;WACR;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,QAAQ;WACR;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;WACA,OAAO;;WAEP;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;WACA,OAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as buildSqliteCodecDescriptorRegistry } from "./codec-descriptor-DRmF-crq-BALI5Jtz.mjs";
|
|
2
|
-
import { t as codecDescriptors } from "./codecs-
|
|
2
|
+
import { t as codecDescriptors } from "./codecs-izq9l1NG-Bb2RnXsx.mjs";
|
|
3
3
|
import { extractCodecLookup } from "@prisma/orm-framework/components/control";
|
|
4
4
|
import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
|
|
5
5
|
//#region ../../../3-targets/sqlite/1-target/dist/codecs.mjs
|
|
@@ -46,4 +46,4 @@ function createSqliteBuiltinCodecLookup() {
|
|
|
46
46
|
//#endregion
|
|
47
47
|
export { sqliteCodecRegistry as a, sqliteCodecDescriptorRegistry as i, createSqliteBuiltinCodecLookup as n, createSqliteCodecRegistryWithBuiltins as r, assembleSqliteCodecRegistry as t };
|
|
48
48
|
|
|
49
|
-
//# sourceMappingURL=codecs-
|
|
49
|
+
//# sourceMappingURL=codecs-BO3frExA.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs-
|
|
1
|
+
{"version":3,"file":"codecs-BO3frExA.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/codecs.mjs"],"sourcesContent":["import { _ as sqliteDurationStringColumn, a as sqliteBigintNumberColumn, b as sqliteBooleanColumn, c as sqliteIntegerColumn, d as sqliteTextColumn, f as sqliteDecimalColumn, g as sqliteDatetimeTemporalColumn, h as sqliteDatetimeStringColumn, i as sqliteBigintColumn, l as sqliteJsonColumn, m as sqliteDateTemporalColumn, o as sqliteBlobColumn, p as sqliteDateStringColumn, r as jsonDocumentRetag, s as sqliteDatetimeColumn, t as codecDescriptors, u as sqliteRealColumn, v as sqliteTimeStringColumn, y as sqliteTimeTemporalColumn } from \"./codecs-izq9l1NG.mjs\";\nimport { n as buildSqliteCodecDescriptorRegistry } from \"./codec-descriptor-DRmF-crq.mjs\";\nimport { o as sqliteNowExpressionFor, r as SQLITE_NOW_EXPRESSION } from \"./datetime-text-DPjoF6HJ.mjs\";\nimport { extractCodecLookup } from \"@internal/framework-components/control\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\n//#region src/core/registry.ts\n/**\n* Registry of every codec descriptor shipped by `@internal/target-sqlite`.\n*\n* Public consumer surface for the sqlite codec set: the sqlite adapter and any other consumer that needs to enumerate or look up a sqlite codec by id consumes this rather than the raw descriptor array. See ADR 208.\n*/\nconst sqliteCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);\nconst sqliteCodecDescriptorRegistry = buildSqliteCodecDescriptorRegistry(codecDescriptors);\n//#endregion\n//#region src/core/codec-registry.ts\nfunction descriptorsFrom(contributors) {\n\treturn contributors.flatMap((contributor) => contributor.types?.codecTypes?.codecDescriptors ?? []);\n}\nfunction buildSqliteCodecRegistry(descriptors) {\n\tconst descriptorRegistry = buildSqliteCodecDescriptorRegistry(descriptors);\n\tconst registry = {\n\t\t...extractCodecLookup([{\n\t\t\tid: \"sqlite-codecs\",\n\t\t\ttypes: { codecTypes: { codecDescriptors: Array.from(descriptorRegistry.values()) } }\n\t\t}]),\n\t\tdescriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),\n\t\tvalues: () => descriptorRegistry.values()\n\t};\n\treturn Object.freeze(registry);\n}\nfunction assembleSqliteCodecRegistry(target, extensions) {\n\treturn buildSqliteCodecRegistry([\n\t\t...descriptorsFrom([target]),\n\t\t...sqliteCodecDescriptorRegistry.values(),\n\t\t...descriptorsFrom(extensions)\n\t]);\n}\nfunction createSqliteCodecRegistryWithBuiltins(codecDescriptors = []) {\n\treturn buildSqliteCodecRegistry([...sqliteCodecDescriptorRegistry.values(), ...codecDescriptors]);\n}\n/**\n* Build a coherent SQLite codec registry populated with built-in descriptors only.\n*\n* The returned registry supports both ordinary codec materialization and SQLite target behavior. Stack-composed paths build the same combined registry from target, full adapter, and ordered extension contributions.\n*/\nfunction createSqliteBuiltinCodecLookup() {\n\treturn createSqliteCodecRegistryWithBuiltins();\n}\n//#endregion\nexport { SQLITE_NOW_EXPRESSION, assembleSqliteCodecRegistry, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, jsonDocumentRetag, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlobColumn, sqliteBooleanColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDateStringColumn, sqliteDateTemporalColumn, sqliteDatetimeColumn, sqliteDatetimeStringColumn, sqliteDatetimeTemporalColumn, sqliteDecimalColumn, sqliteDurationStringColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteNowExpressionFor, sqliteRealColumn, sqliteTextColumn, sqliteTimeStringColumn, sqliteTimeTemporalColumn };\n\n//# sourceMappingURL=codecs.mjs.map"],"mappings":";;;;;;;;;;AAWA,MAAM,sBAAsB,6BAA6B,gBAAgB;AACzE,MAAM,gCAAgC,mCAAmC,gBAAgB;AAGzF,SAAS,gBAAgB,cAAc;CACtC,OAAO,aAAa,SAAS,gBAAgB,YAAY,OAAO,YAAY,oBAAoB,CAAC,CAAC;AACnG;AACA,SAAS,yBAAyB,aAAa;CAC9C,MAAM,qBAAqB,mCAAmC,WAAW;CACzE,MAAM,WAAW;EAChB,GAAG,mBAAmB,CAAC;GACtB,IAAI;GACJ,OAAO,EAAE,YAAY,EAAE,kBAAkB,MAAM,KAAK,mBAAmB,OAAO,CAAC,EAAE,EAAE;EACpF,CAAC,CAAC;EACF,gBAAgB,YAAY,mBAAmB,cAAc,OAAO;EACpE,cAAc,mBAAmB,OAAO;CACzC;CACA,OAAO,OAAO,OAAO,QAAQ;AAC9B;AACA,SAAS,4BAA4B,QAAQ,YAAY;CACxD,OAAO,yBAAyB;EAC/B,GAAG,gBAAgB,CAAC,MAAM,CAAC;EAC3B,GAAG,8BAA8B,OAAO;EACxC,GAAG,gBAAgB,UAAU;CAC9B,CAAC;AACF;AACA,SAAS,sCAAsC,mBAAmB,CAAC,GAAG;CACrE,OAAO,yBAAyB,CAAC,GAAG,8BAA8B,OAAO,GAAG,GAAG,gBAAgB,CAAC;AACjG;;;;;;AAMA,SAAS,iCAAiC;CACzC,OAAO,sCAAsC;AAC9C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as SQLITE_TIME_TEMPORAL_CODEC_ID, a as SQLITE_DATETIME_CODEC_ID, c as SQLITE_DATE_STRING_CODEC_ID, d as SQLITE_DURATION_STRING_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, g as SQLITE_TIME_STRING_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, i as SQLITE_BOOLEAN_CODEC_ID, l as SQLITE_DATE_TEMPORAL_CODEC_ID, m as SQLITE_REAL_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_DATETIME_STRING_CODEC_ID, p as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_DATETIME_TEMPORAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_DECIMAL_CODEC_ID } from "./codec-ids-CTshXpbg-tcdbf_VC.mjs";
|
|
2
2
|
import { a as sqliteCodec, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-DRmF-crq-BALI5Jtz.mjs";
|
|
3
|
-
import { C as sqliteTimeText, S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, f as sqliteDatetimeTextAtMilliseconds, g as sqliteDurationText, h as sqliteDuration, i as sqliteCharacter, l as sqliteDateText, o as sqliteCharacterVarying, p as sqliteDecimal, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from "./data-types-
|
|
3
|
+
import { C as sqliteTimeText, S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, f as sqliteDatetimeTextAtMilliseconds, g as sqliteDurationText, h as sqliteDuration, i as sqliteCharacter, l as sqliteDateText, o as sqliteCharacterVarying, p as sqliteDecimal, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from "./data-types-Djvapurb-BR-Y4NWN.mjs";
|
|
4
4
|
import { a as errorTemporalNonIsoCalendar, c as errorTemporalWrongType, l as sqliteError, n as errorDateTimeUnreadable, r as errorDateTimeUnwritable, t as errorColumnUnreadable } from "./errors-DxbvEzQp-CeTjoGtL.mjs";
|
|
5
5
|
import { t as requireTemporal } from "./require-temporal-CHWqSDF3-ElFTiAh6.mjs";
|
|
6
6
|
import { BinaryExpr, CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from "@prisma/orm-family-sql/relational-core/ast";
|
|
@@ -11,7 +11,7 @@ import { hasDigitsBelowAMillisecond, isValidDate } from "@prisma/orm-framework/t
|
|
|
11
11
|
import { isDecimalText, printedDecimalText } from "@prisma/orm-framework/type-implementations/decimal";
|
|
12
12
|
import { booleanFromInteger, integerFromBoolean } from "@prisma/orm-framework/type-implementations/boolean";
|
|
13
13
|
import { describeValue, temporalFromText, temporalToText } from "@prisma/orm-framework/type-implementations/temporal-text";
|
|
14
|
-
//#region ../../../3-targets/sqlite/1-target/dist/codecs-
|
|
14
|
+
//#region ../../../3-targets/sqlite/1-target/dist/codecs-izq9l1NG.mjs
|
|
15
15
|
/**
|
|
16
16
|
* Projects a blob as a one-element array of its hexadecimal text, and any other value as `otherwise` projects it.
|
|
17
17
|
*
|
|
@@ -1078,4 +1078,4 @@ const codecDescriptors = defineSqliteCodecs([
|
|
|
1078
1078
|
//#endregion
|
|
1079
1079
|
export { sqliteRealColumn as _, sqliteBigintNumberColumn as a, sqliteTimeTemporalColumn as b, sqliteDateStringColumn as c, sqliteDatetimeStringColumn as d, sqliteDatetimeTemporalColumn as f, sqliteJsonColumn as g, sqliteIntegerColumn as h, sqliteBigintColumn as i, sqliteDateTemporalColumn as l, sqliteDurationStringColumn as m, encodeSqliteDatetime as n, sqliteBlobColumn as o, sqliteDecimalColumn as p, jsonDocumentRetag as r, sqliteBooleanColumn as s, codecDescriptors as t, sqliteDatetimeColumn as u, sqliteTextColumn as v, sqliteTimeStringColumn as y };
|
|
1080
1080
|
|
|
1081
|
-
//# sourceMappingURL=codecs-
|
|
1081
|
+
//# sourceMappingURL=codecs-izq9l1NG-Bb2RnXsx.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs-CE5McdzP-CZ5F4Trz.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/codecs-CE5McdzP.mjs"],"sourcesContent":["import { _ as SQLITE_TIME_TEMPORAL_CODEC_ID, a as SQLITE_DATETIME_CODEC_ID, c as SQLITE_DATE_STRING_CODEC_ID, d as SQLITE_DURATION_STRING_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, g as SQLITE_TIME_STRING_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, i as SQLITE_BOOLEAN_CODEC_ID, l as SQLITE_DATE_TEMPORAL_CODEC_ID, m as SQLITE_REAL_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_DATETIME_STRING_CODEC_ID, p as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_DATETIME_TEMPORAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_DECIMAL_CODEC_ID } from \"./codec-ids-CTshXpbg.mjs\";\nimport { C as sqliteTimeText, S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, f as sqliteDatetimeTextAtMilliseconds, g as sqliteDurationText, h as sqliteDuration, i as sqliteCharacter, l as sqliteDateText, o as sqliteCharacterVarying, p as sqliteDecimal, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from \"./data-types-C_NKe4Ni.mjs\";\nimport { a as sqliteCodec, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from \"./codec-descriptor-DRmF-crq.mjs\";\nimport { a as errorTemporalNonIsoCalendar, c as errorTemporalWrongType, l as sqliteError, n as errorDateTimeUnreadable, r as errorDateTimeUnwritable, t as errorColumnUnreadable } from \"./errors-DxbvEzQp.mjs\";\nimport { t as requireTemporal } from \"./require-temporal-CHWqSDF3.mjs\";\nimport { BinaryExpr, CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, floatToJson, readJsonFloat, readJsonIntegerText, refuseJsonValue, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { hasDigitsBelowAMillisecond, isValidDate } from \"@internal/type-implementations/date\";\nimport { isDecimalText, printedDecimalText } from \"@internal/type-implementations/decimal\";\nimport { booleanFromInteger, integerFromBoolean } from \"@internal/type-implementations/boolean\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { describeValue, temporalFromText, temporalToText } from \"@internal/type-implementations/temporal-text\";\n//#region src/core/blob-json-projection.ts\n/**\n* Projects a blob as a one-element array of its hexadecimal text, and any other value as `otherwise` projects it.\n*\n* SQLite's JSON functions reject a BLOB argument outright, so the encoding has to replace the native conversion rather than post-process it. `hex()` emits uppercase and never wraps. The array is what tells a blob from text: outside a STRICT table a column of any type may hold a blob, and a BLOB column may hold text, which passes through as a row carries it. A codec that reads no bytes receives the array and refuses it, as it refuses the bytes a row carries.\n*/\nconst hexJsonProjectionOr = (expression, otherwise) => CaseExpr.of([{\n\tcondition: BinaryExpr.eq(FunctionCallExpr.of(\"typeof\", [expression]), LiteralExpr.of(\"blob\")),\n\tvalue: FunctionCallExpr.of(\"json_array\", [FunctionCallExpr.of(\"hex\", [expression])])\n}], otherwise);\n/** Projects a blob as the one-element array of its hexadecimal text, and any other value unchanged. */\nconst hexJsonProjection = (expression) => hexJsonProjectionOr(expression, expression);\n//#endregion\n//#region src/core/boolean-codec.ts\nfunction describeReceived$1(value) {\n\treturn typeof value === \"string\" ? JSON.stringify(value) : String(value);\n}\nfunction requireBoolean(value) {\n\tif (typeof value === \"boolean\") return value;\n\tthrow sqliteError(\"RUNTIME.ENCODE_FAILED\", `${SQLITE_BOOLEAN_CODEC_ID} value must be a boolean, got ${describeReceived$1(value)}`, { meta: {\n\t\tcodecId: SQLITE_BOOLEAN_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n}\n/** A stored value that is neither 0 nor 1, named by its column where the read knows it. */\nfunction errorBooleanUnreadable(wire, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_BOOLEAN_CODEC_ID,\n\t\treceived: wire,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"0 or 1\",\n\t\treads: \"0 as false and 1 as true\"\n\t});\n}\nvar SqliteBooleanCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn integerFromBoolean(requireBoolean(value));\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn booleanFromInteger(wire) ?? errorBooleanUnreadable(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(requireBoolean(input));\n\t}\n};\nvar SqliteBooleanDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteBoolean.id;\n\tcodecId = SQLITE_BOOLEAN_CODEC_ID;\n\tjsonType = \"boolean\";\n\ttraits = [\"equality\", \"boolean\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteBooleanCodec(this, sqliteBoolean);\n\t}\n};\nconst sqliteBooleanDescriptor = new SqliteBooleanDescriptor();\nconst sqliteBooleanColumn = () => column(sqliteBooleanDescriptor.factory(), sqliteBooleanDescriptor.codecId, void 0);\n//#endregion\n//#region src/core/date-time-values.ts\nconst DATE_ONLY = /^\\d{4}-\\d{2}-\\d{2}$/;\nconst DATE_TIME_WITHOUT_OFFSET = /^(\\d{4}-\\d{2}-\\d{2})[Tt ](\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?)$/;\n/** A date alone as its midnight in UTC, and a date and time without an offset as UTC. */\nfunction asUtcWhenUnmarked(text) {\n\tif (DATE_ONLY.test(text)) return `${text}T00:00:00Z`;\n\tconst unmarked = DATE_TIME_WITHOUT_OFFSET.exec(text);\n\treturn unmarked === null ? text : `${unmarked[1]}T${unmarked[2]}Z`;\n}\n/**\n* The instant SQLite holds for a row, in milliseconds since 1970, read as `Date` reads it, with text without a UTC offset read as UTC, as SQLite's own date and time functions read it, never in the machine's time zone. A number is milliseconds since 1970, as the Prisma ORM query engine wrote a `DateTime`. Digits below a millisecond are cut, as `Date` cuts them.\n*/\nfunction sqliteInstantMilliseconds(codecId, value) {\n\tconst milliseconds = typeof value === \"bigint\" ? NaN : new Date(typeof value === \"number\" ? value : asUtcWhenUnmarked(value)).getTime();\n\tif (Number.isNaN(milliseconds)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be a date and time as text, or a number of milliseconds since 1970: ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn milliseconds;\n}\nfunction messageOf(cause) {\n\treturn cause instanceof Error ? cause.message : String(cause);\n}\n/** The text a write stores for `value`, in the form `stored` writes; a value `stored` refuses is refused as `RUNTIME.ENCODE_FAILED`. */\nfunction storedTextForWrite(codecId, value, stored) {\n\tif (typeof value !== \"string\") throw errorDateTimeUnwritable({\n\t\tcodecId,\n\t\treceived: describeValue(value),\n\t\tdetail: \"It writes ISO 8601 text.\"\n\t});\n\ttry {\n\t\treturn stored(value);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnwritable({\n\t\t\tcodecId,\n\t\t\treceived: JSON.stringify(value),\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The stored form of the text SQLite returned for a row, as `stored` reads it; text `stored` refuses is refused as `RUNTIME.DECODE_FAILED`. */\nfunction storedTextFromWire(codecId, wire, stored) {\n\tif (typeof wire !== \"string\") throw errorDateTimeUnreadable({\n\t\tcodecId,\n\t\tvalue: String(wire),\n\t\tdetail: `SQLite returned ${describeValue(wire)}, not text.`\n\t});\n\ttry {\n\t\treturn stored(wire);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnreadable({\n\t\t\tcodecId,\n\t\t\tvalue: wire,\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The Temporal value that stored text names, read with `parse`. */\nfunction temporalFromStoredText(identity, text, parse) {\n\tconst read = temporalFromText(requireTemporal({\n\t\tcodecId: identity.codecId,\n\t\toperation: \"decode\"\n\t}), text, parse);\n\tif (read.kind === \"unreadable\") throw errorDateTimeUnreadable({\n\t\tcodecId: identity.codecId,\n\t\tvalue: text,\n\t\tdetail: `${identity.temporalTag} cannot hold it: ${read.detail}. Use ${identity.stringType} to read the column as text.`,\n\t\tcause: read.cause\n\t});\n\treturn read.value;\n}\n/** The text a write stores for a Temporal value, in the form `stored` writes. A value of another kind, in a calendar other than ISO 8601, or with digits below a millisecond is refused. */\nfunction storedTextOfTemporal(identity, value, stored) {\n\tconst encoded = temporalToText(value, identity.temporalTag);\n\tswitch (encoded.kind) {\n\t\tcase \"wrong-type\": throw errorTemporalWrongType(identity.codecId, identity.temporalTag, identity.stringType, encoded.received);\n\t\tcase \"non-iso-calendar\": throw errorTemporalNonIsoCalendar(identity.codecId, encoded.calendarId);\n\t\tcase \"text\":\n\t\t\tif (hasDigitsBelowAMillisecond(encoded.text)) throw errorDateTimeUnwritable({\n\t\t\t\tcodecId: identity.codecId,\n\t\t\t\treceived: `the ${identity.temporalTag} ${encoded.text}`,\n\t\t\t\tdetail: \"It has digits below a millisecond, and the column holds milliseconds. Round it first, as in value.round({ smallestUnit: 'millisecond', roundingMode: 'trunc' }).\"\n\t\t\t});\n\t\t\treturn storedTextForWrite(identity.codecId, encoded.text, stored);\n\t}\n}\n//#endregion\n//#region src/core/date-time-codecs.ts\nconst DATETIME_TEMPORAL = {\n\tcodecId: SQLITE_DATETIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.Instant\",\n\tstringType: \"DatetimeString\"\n};\nconst DATE_TEMPORAL = {\n\tcodecId: SQLITE_DATE_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainDate\",\n\tstringType: \"DateString\"\n};\nconst TIME_TEMPORAL = {\n\tcodecId: SQLITE_TIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainTime\",\n\tstringType: \"TimeString\"\n};\n/** A row's text is what the codec reads, so its JSON is the stored text as it is. */\nconst storedTextJsonProjection = (expression) => expression;\nconst sqliteDatetimeTemporalEncode = (value) => storedTextOfTemporal(DATETIME_TEMPORAL, value, sqliteDatetimeTextAtMilliseconds);\nconst sqliteDateTemporalEncode = (value) => storedTextOfTemporal(DATE_TEMPORAL, value, sqliteDateText);\nconst sqliteTimeTemporalEncode = (value) => storedTextOfTemporal(TIME_TEMPORAL, value, sqliteTimeText);\n/** An instant read as `Temporal.Instant`, from any text or number `sqlite/datetime@1` reads, at millisecond precision. */\nvar SqliteDatetimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqliteDatetimeTemporalEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\tconst milliseconds = sqliteInstantMilliseconds(this.id, wire);\n\t\treturn requireTemporal({\n\t\t\tcodecId: this.id,\n\t\t\toperation: \"decode\"\n\t\t}).Instant.fromEpochMilliseconds(milliseconds);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn temporalFromStoredText(DATETIME_TEMPORAL, value.value, (temporal, text) => temporal.Instant.from(text));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(sqliteDatetimeTemporalEncode(input));\n\t}\n};\nvar SqliteDatetimeTemporalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDatetime.id;\n\tcodecId = SQLITE_DATETIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteDatetimeTemporalCodec(this, sqliteDatetime);\n\t}\n};\nconst sqliteDatetimeTemporalDescriptor = new SqliteDatetimeTemporalDescriptor();\nconst sqliteDatetimeTemporalColumn = () => column(sqliteDatetimeTemporalDescriptor.factory(), sqliteDatetimeTemporalDescriptor.codecId, void 0);\n/** An instant read as the text `sqlite/datetime` stores, `2024-01-01T00:00:00.000Z`, from any text or number `sqlite/datetime@1` reads. A write converts ISO 8601 text with any UTC offset to that form. */\nvar SqliteDatetimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteDatetimeTextAtMilliseconds);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn new Date(sqliteInstantMilliseconds(this.id, wire)).toISOString();\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteDatetimeStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDatetime.id;\n\tcodecId = SQLITE_DATETIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDatetimeStringCodec(this, sqliteDatetime);\n\t}\n};\nconst sqliteDatetimeStringDescriptor = new SqliteDatetimeStringDescriptor();\nconst sqliteDatetimeStringColumn = () => column(sqliteDatetimeStringDescriptor.factory(), sqliteDatetimeStringDescriptor.codecId, void 0);\n/** A calendar date read as the text `sqlite/date` stores, `2024-02-29`. */\nvar SqliteDateStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteDateText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, sqliteDateText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteDateStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDate.id;\n\tcodecId = SQLITE_DATE_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDateStringCodec(this, sqliteDate);\n\t}\n};\nconst sqliteDateStringDescriptor = new SqliteDateStringDescriptor();\nconst sqliteDateStringColumn = () => column(sqliteDateStringDescriptor.factory(), sqliteDateStringDescriptor.codecId, void 0);\n/** A calendar date read as `Temporal.PlainDate`. */\nvar SqliteDateTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqliteDateTemporalEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn temporalFromStoredText(DATE_TEMPORAL, storedTextFromWire(this.id, wire, sqliteDateText), (temporal, text) => temporal.PlainDate.from(text));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn temporalFromStoredText(DATE_TEMPORAL, value.value, (temporal, text) => temporal.PlainDate.from(text));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(sqliteDateTemporalEncode(input));\n\t}\n};\nvar SqliteDateTemporalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDate.id;\n\tcodecId = SQLITE_DATE_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteDateTemporalCodec(this, sqliteDate);\n\t}\n};\nconst sqliteDateTemporalDescriptor = new SqliteDateTemporalDescriptor();\nconst sqliteDateTemporalColumn = () => column(sqliteDateTemporalDescriptor.factory(), sqliteDateTemporalDescriptor.codecId, void 0);\n/** A time of day read as the text `sqlite/time` stores, `09:30:00.000`. A write pads text with fewer fraction digits to three. */\nvar SqliteTimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteTimeText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, sqliteTimeText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteTimeStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteTime.id;\n\tcodecId = SQLITE_TIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteTimeStringCodec(this, sqliteTime);\n\t}\n};\nconst sqliteTimeStringDescriptor = new SqliteTimeStringDescriptor();\nconst sqliteTimeStringColumn = () => column(sqliteTimeStringDescriptor.factory(), sqliteTimeStringDescriptor.codecId, void 0);\n/** A time of day read as `Temporal.PlainTime`. */\nvar SqliteTimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqliteTimeTemporalEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn temporalFromStoredText(TIME_TEMPORAL, storedTextFromWire(this.id, wire, sqliteTimeText), (temporal, text) => temporal.PlainTime.from(text));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn temporalFromStoredText(TIME_TEMPORAL, value.value, (temporal, text) => temporal.PlainTime.from(text));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(sqliteTimeTemporalEncode(input));\n\t}\n};\nvar SqliteTimeTemporalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteTime.id;\n\tcodecId = SQLITE_TIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteTimeTemporalCodec(this, sqliteTime);\n\t}\n};\nconst sqliteTimeTemporalDescriptor = new SqliteTimeTemporalDescriptor();\nconst sqliteTimeTemporalColumn = () => column(sqliteTimeTemporalDescriptor.factory(), sqliteTimeTemporalDescriptor.codecId, void 0);\n/** A length of time read as the ISO 8601 duration it was written as, `PT1H30M`. Its text does not sort in the order of the durations, so it offers no order. */\nvar SqliteDurationStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteDurationText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, sqliteDurationText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteDurationStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDuration.id;\n\tcodecId = SQLITE_DURATION_STRING_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDurationStringCodec(this, sqliteDuration);\n\t}\n};\nconst sqliteDurationStringDescriptor = new SqliteDurationStringDescriptor();\nconst sqliteDurationStringColumn = () => column(sqliteDurationStringDescriptor.factory(), sqliteDurationStringDescriptor.codecId, void 0);\n//#endregion\n//#region src/core/decimal-codec.ts\nconst EXPECTED = \"decimal text, such as \\\"12.50\\\"\";\nfunction describeReceived(value) {\n\treturn typeof value === \"string\" ? JSON.stringify(value) : String(value);\n}\n/** The decimal text the codec writes for an application value: the value without leading zeros or a minus sign on zero. */\nfunction storedDecimalText(value) {\n\tif (typeof value === \"string\" && isDecimalText(value)) return printedDecimalText(value);\n\tthrow sqliteError(\"RUNTIME.ENCODE_FAILED\", `${SQLITE_DECIMAL_CODEC_ID} value must be ${EXPECTED}, got ${describeReceived(value)}`, { meta: {\n\t\tcodecId: SQLITE_DECIMAL_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n}\n/** A stored value the codec cannot read, such as the empty text an earlier fill wrote into a new column, named by its column where the read knows it. */\nfunction errorDecimalUnreadable(wire, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_DECIMAL_CODEC_ID,\n\t\treceived: wire,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"decimal text\",\n\t\treads: EXPECTED\n\t});\n}\nvar SqliteDecimalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedDecimalText(value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tif (typeof wire === \"string\" && isDecimalText(wire)) return wire;\n\t\treturn errorDecimalUnreadable(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(storedDecimalText(input));\n\t}\n};\nvar SqliteDecimalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteDecimal.id;\n\tcodecId = SQLITE_DECIMAL_CODEC_ID;\n\tjsonType = \"string\";\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDecimalCodec(this, sqliteDecimal);\n\t}\n};\nconst sqliteDecimalDescriptor = new SqliteDecimalDescriptor();\nconst sqliteDecimalColumn = () => column(sqliteDecimalDescriptor.factory(), sqliteDecimalDescriptor.codecId, void 0);\n//#endregion\n//#region src/core/codecs.ts\n/**\n* Projects the expression unchanged, for codecs whose canonical JSON is what\n* SQLite's own JSON conversion already produces.\n*\n* Identity here is a claim about the target's behaviour, not an absence of one:\n* the codec's conformance cases are what test it, including at the boundaries\n* of the representation where a native conversion would be most likely to\n* diverge.\n*/\nconst identityJsonProjection = (expression) => expression;\n/**\n* Projects an integer as decimal text, a blob as the array of its hex text, and any other value as SQLite writes it in JSON, so a codec reads and refuses through an include what it reads and refuses in a row.\n*\n* The cast is part of the projected expression, so it applies before the JSON constructor sees the value: handed an INTEGER directly, the constructor emits a JSON number, and SQLite's 64-bit range does not survive being read back as a double. Casting the constructor's result would be too late. A blob cast to text would read as the digits its bytes spell, and a REAL cast to text would read as text.\n*/\nconst integerJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: BinaryExpr.eq(FunctionCallExpr.of(\"typeof\", [expression]), LiteralExpr.of(\"integer\")),\n\tvalue: CastExpr.as(expression, \"TEXT\")\n}], hexJsonProjection(expression));\n/**\n* Projects a REAL as SQLite writes it in JSON, except an infinity, which SQLite writes as `9.0e+999` and which becomes the text `Infinity` or `-Infinity` that the codec stores. The test is equality with an infinity, so text or a blob that a REAL column holds outside a STRICT table passes through unchanged.\n*/\nconst floatJsonProjection = (expression) => hexJsonProjectionOr(expression, infinityAsTextJsonProjection(expression));\nconst infinityAsTextJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: BinaryExpr.eq(expression, LiteralExpr.of(Number.POSITIVE_INFINITY)),\n\tvalue: LiteralExpr.of(\"Infinity\")\n}, {\n\tcondition: BinaryExpr.eq(expression, LiteralExpr.of(Number.NEGATIVE_INFINITY)),\n\tvalue: LiteralExpr.of(\"-Infinity\")\n}], expression);\nconst JSON_RETAG_FN = \"json\";\n/**\n* Re-applies SQLite's JSON subtype to a document-valued expression.\n*\n* SQLite carries \"this text is JSON\" as a subtype on the value rather than in\n* its type, and the subtype does not survive a derived table: a document that\n* `json_object` produced arrives one level out as plain text, so the enclosing\n* constructor embeds it as a *string containing JSON* rather than as a\n* document. `json()` re-applies the subtype, which is what makes the value nest\n* as a document again.\n*\n* The loss happens at the first derived-table boundary and does not compound, so\n* a retag is needed where the document is consumed rather than at every level it\n* passes through.\n*\n* Applying this twice is a no-op — SQLite's `json()` is idempotent, and the\n* wrapper collapses rather than nesting so the rendered SQL says so too. It is\n* safe on any valid JSON text, including scalars, and on NULL; it raises\n* `malformed JSON` on text that is not JSON, which is the correct failure for a\n* value that was never a document.\n*/\nconst jsonDocumentRetag = (expression) => isJsonRetag(expression) ? expression : FunctionCallExpr.of(JSON_RETAG_FN, [expression]);\n/** Whether an expression is already a retag, so applying one again would only nest. */\nconst isJsonRetag = (expression) => expression instanceof FunctionCallExpr && expression.fn === JSON_RETAG_FN && expression.args.length === 1;\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** Renders the document a `sqlite/json` value's JSON text holds, when it is a string, number or boolean, and nothing for text that is not JSON. */\nfunction jsonTextLiteral(value) {\n\tif (typeof value !== \"string\") return void 0;\n\ttry {\n\t\treturn renderTsLiteral(JSON.parse(value));\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* SQLite stores an infinity but not NaN, which it turns into NULL, so a float codec on SQLite refuses NaN wherever it writes a value: to a parameter, and to the contract.\n*/\nfunction refuseNaN(codecId, value) {\n\tif (Number.isNaN(value)) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a number other than NaN, which SQLite cannot store`, { meta: {\n\t\tcodecId,\n\t\treceived: \"NaN\"\n\t} });\n\treturn value;\n}\n/** Reads a float's JSON form, which on SQLite has no NaN. */\nfunction readJsonFloatWithoutNaN(codecId, json) {\n\tconst value = readJsonFloat(codecId, json);\n\tif (Number.isNaN(value)) return refuseJsonValue(codecId, \"a finite number or the text Infinity or -Infinity; SQLite cannot store NaN\", json);\n\treturn value;\n}\n/** `sql/float@1` as SQLite stores it: without NaN. */\nvar SqliteFloatCodec = class extends SqlFloatCodec {\n\tasync toWire(value, ctx) {\n\t\treturn super.toWire(refuseNaN(this.id, value), ctx);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn floatWire(this.id, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloatWithoutNaN(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn super.toDataTypeValue(refuseNaN(this.id, input));\n\t}\n};\n/**\n* Requires an application value to be of the JS type the codec reads.\n*\n* A range check reads a value of the wrong type as a value out of range, and\n* reports a number plainly inside the range as outside it — so the type is\n* established first and answered for on its own terms, naming what a caller\n* has to change.\n*/\nconst requireJsType = (codecId, expected, value) => {\n\tif (typeof value === expected) return;\n\tthrow sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a ${expected}, got ${typeof value} ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: typeof value\n\t} });\n};\n/**\n* Writes an application value as the decimal text `sqlite/bigint@1` carries as\n* its canonical JSON.\n*\n* A schema-written literal default (`BigInt @default(0)`) arrives here as a\n* `number`, since a number literal is the only integer a schema language\n* writes, and one that is a safe integer names its value exactly. Past that\n* range the literal was rounded before any of this ran, so the value written is\n* not the value meant — which this refuses rather than minting an exact-looking\n* value from it. A non-integral number is refused on the same terms.\n*/\nconst bigintEncodeJson = (codecId, value) => {\n\tif (typeof value !== \"number\") return encodableInt64(codecId, value).toString();\n\tif (!Number.isSafeInteger(value)) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} number literal must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn BigInt(value).toString();\n};\nconst INT64_RANGE$1 = {\n\tmin: -(2n ** 63n),\n\tmax: 2n ** 63n - 1n\n};\n/** The application value `sqlite/bigint@1` writes: a `bigint` within the signed 64-bit range an SQLite INTEGER holds. */\nconst encodableInt64 = (codecId, value) => {\n\trequireJsType(codecId, \"bigint\", value);\n\tif (value < INT64_RANGE$1.min || value > INT64_RANGE$1.max) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be an integer from ${INT64_RANGE$1.min} to ${INT64_RANGE$1.max}, which SQLite stores, got ${value}`, { meta: {\n\t\tcodecId,\n\t\treceived: value.toString()\n\t} });\n\treturn value;\n};\n/**\n* The application value a number-flavoured integer codec writes: the JS type it reads, an integer within ±(2^53 − 1), the range a `number` holds exactly. The guard throws rather than rounding: past the boundary a `number` silently loses digits, which is the failure mode these codecs exist to refuse.\n*/\nconst encodableSafeInteger = (codecId, value) => {\n\trequireJsType(codecId, \"number\", value);\n\tif (!Number.isSafeInteger(value)) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn Object.is(value, -0) ? 0 : value;\n};\n/** `sqlite/integer`'s stored form, read into a `number`: digit text within the safe integer range. */\nconst safeIntegerFromDigitText = (codecId, json) => Number(readJsonIntegerText(codecId, json, SAFE_INTEGER_BIGINT_RANGE));\n/** A `number` written as `sqlite/integer`'s stored form. */\nconst digitTextOfSafeInteger = (codecId, value) => String(encodableSafeInteger(codecId, value));\nfunction errorIntegerUnreadable(codecId, received, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId,\n\t\treceived,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"an integer within the safe integer range\",\n\t\treads: `integers from ${SAFE_INTEGER_BIGINT_RANGE.min} to ${SAFE_INTEGER_BIGINT_RANGE.max}`\n\t});\n}\n/** A stored value `sqlite/bigint@1` cannot read, named by its column where the read knows it. */\nfunction errorBigintUnreadable(received, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\treceived,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"stored as a 64-bit integer\",\n\t\treads: `integers from ${INT64_RANGE$1.min} to ${INT64_RANGE$1.max}`\n\t});\n}\n/** An integer the driver reads exactly, or the decimal text an include carries, read into a safe-range `number`. A blob, which a row carries as bytes and an include as the array of their hex text, is refused. */\nfunction safeIntegerFromExact(codecId, wire, ctx) {\n\tconst value = typeof wire === \"bigint\" ? wire : typeof wire === \"string\" && DECIMAL_INTEGER.test(wire) ? BigInt(wire) : void 0;\n\tif (value === void 0 || value < SAFE_INTEGER_BIGINT_RANGE.min || value > SAFE_INTEGER_BIGINT_RANGE.max) return errorIntegerUnreadable(codecId, wire, ctx);\n\treturn Number(value);\n}\n/** Reads an INTEGER's wire value into a `number` within the safe integer range. A stored REAL, such as 1.5, is refused too. */\nfunction safeIntegerWire(codecId, wire, ctx) {\n\tif (typeof wire !== \"number\") return safeIntegerFromExact(codecId, wire, ctx);\n\tif (Number.isSafeInteger(wire)) return Object.is(wire, -0) ? 0 : wire;\n\treturn errorIntegerUnreadable(codecId, wire, ctx);\n}\n/**\n* Reads a REAL's wire value: the number the driver returns for a row, an integer outside the safe range as the nearest float, or the text `Infinity` or `-Infinity` an include carries, because JSON has no infinity. Anything else, such as other text or a blob, is refused naming its column.\n*/\nfunction floatWire(codecId, wire, ctx) {\n\tif (typeof wire === \"number\") return wire;\n\tif (typeof wire === \"bigint\") return Number(wire);\n\tif (wire === \"Infinity\") return Number.POSITIVE_INFINITY;\n\tif (wire === \"-Infinity\") return Number.NEGATIVE_INFINITY;\n\tthrow errorColumnUnreadable({\n\t\tcodecId,\n\t\treceived: wire,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"a number\",\n\t\treads: \"a number, or the text Infinity or -Infinity\"\n\t});\n}\n/** The hex text SQLite's `hex()` writes: two uppercase digits for each byte. */\nconst BLOB_HEX_TEXT = /^(?:[0-9A-F]{2})*$/;\n/**\n* Projects a `sql/char@1` value without trailing spaces, as its `decode` reads it on a flat read, so an include reads the same value. SQLite does not pad the value; the rule is the family codec's.\n*/\nconst unpaddedCharJsonProjection = (expression) => FunctionCallExpr.of(\"rtrim\", [expression, LiteralExpr.of(\" \")]);\nconst sqliteSqlCharDescriptor = sqliteCodec(sqlCharDescriptor, {\n\tdataType: sqliteCharacter,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: unpaddedCharJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlCharCodec(descriptor, dataType, params)\n});\nconst sqliteSqlVarcharDescriptor = sqliteCodec(sqlVarcharDescriptor, {\n\tdataType: sqliteCharacterVarying,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlVarcharCodec(descriptor, dataType, params)\n});\n/**\n* `sql/raw@1` as SQLite reads it: a value keeps the shape the driver returns for its storage class. An include carries a BLOB as the array of its hex text that the projection writes, because SQLite's JSON functions refuse a blob; a column value never reaches the JSON constructor as an array, so the array is a BLOB.\n*/\nvar SqliteSqlRawCodec = class extends SqlRawCodec {\n\tasync fromWire(wire, _ctx) {\n\t\tif (!Array.isArray(wire)) return wire;\n\t\tconst [hex] = wire.length === 1 ? wire : [];\n\t\tif (typeof hex !== \"string\" || !BLOB_HEX_TEXT.test(hex)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `${this.id} wire value in an include must be the array of a BLOB's hex text`, { meta: {\n\t\t\tcodecId: this.id,\n\t\t\treceived: String(wire)\n\t\t} });\n\t\treturn new Uint8Array(Buffer.from(hex, \"hex\"));\n\t}\n};\nconst sqliteSqlRawDescriptor = sqliteCodec(sqlRawDescriptor, {\n\tdataType: sqlRawDataType,\n\tjsonProjection: hexJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqliteSqlRawCodec(descriptor, dataType, params)\n});\n/** `sql/int@1` as SQLite stores it: its stored form is `sqlite/integer`'s digit text. */\nvar SqliteSqlIntCodec = class extends SqlIntCodec {\n\tasync fromWire(wire, ctx) {\n\t\treturn safeIntegerWire(this.id, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn safeIntegerFromDigitText(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(digitTextOfSafeInteger(this.id, input));\n\t}\n};\nconst sqliteSqlIntDescriptor = sqliteCodec(sqlIntDescriptor, {\n\tdataType: sqliteInteger,\n\trenderValueLiteral: decimalTextNumberLiteral,\n\tjsonProjection: integerJsonProjection,\n\tfactory: (descriptor, dataType) => () => new SqliteSqlIntCodec(descriptor, dataType)\n});\nconst sqliteSqlFloatDescriptor = sqliteCodec(sqlFloatDescriptor, {\n\tdataType: sqliteReal,\n\trenderValueLiteral: floatNumberLiteral,\n\tjsonProjection: floatJsonProjection,\n\tfactory: (descriptor, dataType) => () => new SqliteFloatCodec(descriptor, dataType)\n});\nvar SqliteTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqliteTextDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = sqliteText.id;\n\tcodecId = SQLITE_TEXT_CODEC_ID;\n\tjsonType = \"string\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteTextCodec(this, sqliteText);\n\t}\n};\nconst sqliteTextDescriptor = new SqliteTextDescriptor();\nconst sqliteTextColumn = () => column(sqliteTextDescriptor.factory(), sqliteTextDescriptor.codecId, void 0);\nvar SqliteIntegerCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodableSafeInteger(SQLITE_INTEGER_CODEC_ID, value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn safeIntegerWire(SQLITE_INTEGER_CODEC_ID, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn safeIntegerFromDigitText(SQLITE_INTEGER_CODEC_ID, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(digitTextOfSafeInteger(SQLITE_INTEGER_CODEC_ID, input));\n\t}\n};\nvar SqliteIntegerDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn integerJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_INTEGER_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteIntegerCodec(this, sqliteInteger);\n\t}\n};\nconst sqliteIntegerDescriptor = new SqliteIntegerDescriptor();\nconst sqliteIntegerColumn = () => column(sqliteIntegerDescriptor.factory(), sqliteIntegerDescriptor.codecId, void 0);\nvar SqliteRealCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn refuseNaN(SQLITE_REAL_CODEC_ID, value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn floatWire(SQLITE_REAL_CODEC_ID, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloatWithoutNaN(SQLITE_REAL_CODEC_ID, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(floatToJson(refuseNaN(SQLITE_REAL_CODEC_ID, input)));\n\t}\n};\nvar SqliteRealDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn floatJsonProjection(expression);\n\t}\n\tdataType = sqliteReal.id;\n\tcodecId = SQLITE_REAL_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn floatNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteRealCodec(this, sqliteReal);\n\t}\n};\nconst sqliteRealDescriptor = new SqliteRealDescriptor();\nconst sqliteRealColumn = () => column(sqliteRealDescriptor.factory(), sqliteRealDescriptor.codecId, void 0);\nvar SqliteBlobCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\t/** A row carries the blob's bytes; an include carries the array of their hex text that its projection writes, because SQLite's JSON functions refuse a blob. Anything else a BLOB column holds is refused. */\n\tasync fromWire(wire, ctx) {\n\t\tif (wire instanceof Uint8Array) return wire;\n\t\tconst [hex] = Array.isArray(wire) && wire.length === 1 ? wire : [];\n\t\tif (typeof hex !== \"string\" || !BLOB_HEX_TEXT.test(hex)) throw errorColumnUnreadable({\n\t\t\tcodecId: SQLITE_BLOB_CODEC_ID,\n\t\t\treceived: wire,\n\t\t\tcolumn: ctx.column,\n\t\t\tnotA: \"a blob\",\n\t\t\treads: \"a blob's bytes\"\n\t\t});\n\t\treturn new Uint8Array(Buffer.from(hex, \"hex\"));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn new Uint8Array(Buffer.from(value.value, \"hex\"));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(Buffer.from(input).toString(\"hex\").toUpperCase());\n\t}\n};\nvar SqliteBlobDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteBlob.id;\n\tcodecId = SQLITE_BLOB_CODEC_ID;\n\tjsonType = \"object\";\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteBlobCodec(this, sqliteBlob);\n\t}\n};\nconst sqliteBlobDescriptor = new SqliteBlobDescriptor();\nconst sqliteBlobColumn = () => column(sqliteBlobDescriptor.factory(), sqliteBlobDescriptor.codecId, void 0);\n/**\n* Reads what SQLite holds for an instant as `Date` reads it, with text without a UTC offset read as UTC, as SQLite's own date and time functions read it, never in the machine's time zone. A number is milliseconds since 1970, as the Prisma ORM query engine wrote a `DateTime`. Digits below a millisecond are cut, as `Date` cuts them.\n*/\nfunction decodeSqliteDatetime(value) {\n\treturn new Date(sqliteInstantMilliseconds(SQLITE_DATETIME_CODEC_ID, value));\n}\n/** The text SQLite holds for an instant: what the codec writes for every row, and for a default. An Invalid Date is refused, naming the codec. */\nfunction encodeSqliteDatetime(value) {\n\tif (!isValidDate(value)) throw errorDateTimeUnwritable({\n\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\treceived: \"an Invalid Date\",\n\t\tdetail: \"Pass a Date that holds an instant.\"\n\t});\n\treturn value.toISOString();\n}\nvar SqliteDatetimeCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodeSqliteDatetime(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn decodeSqliteDatetime(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn new Date(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(encodeSqliteDatetime(input));\n\t}\n};\nvar SqliteDatetimeDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = sqliteDatetime.id;\n\tcodecId = SQLITE_DATETIME_CODEC_ID;\n\tjsonType = \"string\";\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteDatetimeCodec(this, sqliteDatetime);\n\t}\n};\nconst sqliteDatetimeDescriptor = new SqliteDatetimeDescriptor();\nconst sqliteDatetimeColumn = () => column(sqliteDatetimeDescriptor.factory(), sqliteDatetimeDescriptor.codecId, void 0);\n/** A stored value `sqlite/json@1` cannot read, named by its column where the read knows it. */\nfunction errorJsonUnreadable(received, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_JSON_CODEC_ID,\n\t\treceived,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"JSON text\",\n\t\treads: \"JSON text as the document it holds\"\n\t});\n}\nvar SqliteJsonCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn JSON.stringify(value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tif (wire instanceof Uint8Array || Array.isArray(wire)) return errorJsonUnreadable(wire, ctx);\n\t\tif (typeof wire !== \"string\") return wire;\n\t\ttry {\n\t\t\treturn blindCast(JSON.parse(wire));\n\t\t} catch {\n\t\t\treturn errorJsonUnreadable(wire, ctx);\n\t\t}\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn blindCast(JSON.parse(value.value));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(JSON.stringify(input));\n\t}\n};\n/**\n* The column stores the document's JSON text and the stored form is that text, so the stored text is projected as it is: a string the enclosing JSON constructor embeds as a string. A blob is projected as the array of its hex text, which the codec refuses, because SQLite's JSON functions refuse a blob.\n*/\nvar SqliteJsonDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteJson.id;\n\tcodecId = SQLITE_JSON_CODEC_ID;\n\tjsonType = \"any\";\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn jsonTextLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteJsonCodec(this, sqliteJson);\n\t}\n};\nconst sqliteJsonDescriptor = new SqliteJsonDescriptor();\nconst sqliteJsonColumn = () => column(sqliteJsonDescriptor.factory(), sqliteJsonDescriptor.codecId, void 0);\nvar SqliteBigintCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodableInt64(SQLITE_BIGINT_CODEC_ID, value);\n\t}\n\t/**\n\t* The driver reads an integer outside the safe range as an exact `bigint` and one inside it as a `number`; an include and a wide aggregate carry decimal text. Anything else, such as a stored REAL, text or a blob, is refused naming its column.\n\t*/\n\tasync fromWire(wire, ctx) {\n\t\tif (typeof wire === \"bigint\") return wire;\n\t\tif (typeof wire === \"number\" && Number.isSafeInteger(wire)) return BigInt(wire);\n\t\tif (typeof wire === \"string\" && DECIMAL_INTEGER.test(wire)) return BigInt(wire);\n\t\treturn errorBigintUnreadable(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn BigInt(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(bigintEncodeJson(SQLITE_BIGINT_CODEC_ID, input));\n\t}\n};\nvar SqliteBigintDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn integerJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_BIGINT_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteBigintCodec(this, sqliteInteger);\n\t}\n};\nconst sqliteBigintDescriptor = new SqliteBigintDescriptor();\nconst sqliteBigintColumn = () => column(sqliteBigintDescriptor.factory(), sqliteBigintDescriptor.codecId, void 0);\n/**\n* A SQLite INTEGER decoded as a JS `number`, for columns whose values stay\n* within the safe integer range ±(2^53 − 1). Both directions guard rather than\n* round: decode (wire and JSON) and encode throw a structured error on\n* out-of-range or non-integral input. The canonical JSON is the decimal text\n* `sqlite/integer` carries, which every codec of that data type shares.\n*/\nvar SqliteBigintNumberCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodableSafeInteger(SQLITE_BIGINT_NUMBER_CODEC_ID, value);\n\t}\n\t/**\n\t* The driver hands an INTEGER over as a `number`, or as a `bigint` outside the safe range; a bigint (or decimal text) is range-checked exactly before any conversion to `number`, so an out-of-range value throws rather than rounds. A blob is refused.\n\t*/\n\tasync fromWire(wire, ctx) {\n\t\treturn safeIntegerWire(SQLITE_BIGINT_NUMBER_CODEC_ID, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn safeIntegerFromDigitText(SQLITE_BIGINT_NUMBER_CODEC_ID, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(digitTextOfSafeInteger(SQLITE_BIGINT_NUMBER_CODEC_ID, input));\n\t}\n};\nvar SqliteBigintNumberDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn integerJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_BIGINT_NUMBER_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteBigintNumberCodec(this, sqliteInteger);\n\t}\n};\nconst sqliteBigintNumberDescriptor = new SqliteBigintNumberDescriptor();\nconst sqliteBigintNumberColumn = () => column(sqliteBigintNumberDescriptor.factory(), sqliteBigintNumberDescriptor.codecId, void 0);\nconst codecDescriptors = defineSqliteCodecs([\n\tsqliteSqlCharDescriptor,\n\tsqliteSqlVarcharDescriptor,\n\tsqliteSqlIntDescriptor,\n\tsqliteSqlFloatDescriptor,\n\tsqliteSqlRawDescriptor,\n\tsqliteTextDescriptor,\n\tsqliteIntegerDescriptor,\n\tsqliteRealDescriptor,\n\tsqliteBlobDescriptor,\n\tsqliteDatetimeDescriptor,\n\tsqliteDatetimeTemporalDescriptor,\n\tsqliteDatetimeStringDescriptor,\n\tsqliteDateStringDescriptor,\n\tsqliteDateTemporalDescriptor,\n\tsqliteTimeStringDescriptor,\n\tsqliteTimeTemporalDescriptor,\n\tsqliteDurationStringDescriptor,\n\tsqliteJsonDescriptor,\n\tsqliteBigintDescriptor,\n\tsqliteBigintNumberDescriptor,\n\tsqliteDecimalDescriptor,\n\tsqliteBooleanDescriptor\n]);\n//#endregion\nexport { sqliteDurationStringColumn as _, sqliteBigintNumberColumn as a, sqliteBooleanColumn as b, sqliteIntegerColumn as c, sqliteTextColumn as d, sqliteDecimalColumn as f, sqliteDatetimeTemporalColumn as g, sqliteDatetimeStringColumn as h, sqliteBigintColumn as i, sqliteJsonColumn as l, sqliteDateTemporalColumn as m, encodeSqliteDatetime as n, sqliteBlobColumn as o, sqliteDateStringColumn as p, jsonDocumentRetag as r, sqliteDatetimeColumn as s, codecDescriptors as t, sqliteRealColumn as u, sqliteTimeStringColumn as v, sqliteTimeTemporalColumn as y };\n\n//# sourceMappingURL=codecs-CE5McdzP.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,MAAM,uBAAuB,YAAY,cAAc,SAAS,GAAG,CAAC;CACnE,WAAW,WAAW,GAAG,iBAAiB,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG,YAAY,GAAG,MAAM,CAAC;CAC5F,OAAO,iBAAiB,GAAG,cAAc,CAAC,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AACpF,CAAC,GAAG,SAAS;;AAEb,MAAM,qBAAqB,eAAe,oBAAoB,YAAY,UAAU;AAGpF,SAAS,mBAAmB,OAAO;CAClC,OAAO,OAAO,UAAU,WAAW,KAAK,UAAU,KAAK,IAAI,OAAO,KAAK;AACxE;AACA,SAAS,eAAe,OAAO;CAC9B,IAAI,OAAO,UAAU,WAAW,OAAO;CACvC,MAAM,YAAY,yBAAyB,GAAG,wBAAwB,gCAAgC,mBAAmB,KAAK,KAAK,EAAE,MAAM;EAC1I,SAAS;EACT,UAAU,OAAO,KAAK;CACvB,EAAE,CAAC;AACJ;;AAEA,SAAS,uBAAuB,MAAM,KAAK;CAC1C,MAAM,sBAAsB;EAC3B,SAAS;EACT,UAAU;EACV,QAAQ,IAAI;EACZ,MAAM;EACN,OAAO;CACR,CAAC;AACF;AACA,IAAI,qBAAqB,cAAc,UAAU;CAChD,MAAM,OAAO,OAAO,MAAM;EACzB,OAAO,mBAAmB,eAAe,KAAK,CAAC;CAChD;CACA,MAAM,SAAS,MAAM,KAAK;EACzB,OAAO,mBAAmB,IAAI,KAAK,uBAAuB,MAAM,GAAG;CACpE;CACA,kBAAkB,OAAO;EACxB,OAAO,MAAM;CACd;CACA,gBAAgB,OAAO;EACtB,OAAO,KAAK,g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BAAyB,+BAA+B,MAAM,KAAK;CAC3E;CACA,gBAAgB,OAAO;EACtB,OAAO,KAAK,gBAAgB,uBAAuB,+BAA+B,KAAK,CAAC;CACzF;AACD;AACA,IAAI,+BAA+B,cAAc,sBAAsB;CACtE,eAAe,YAAY;EAC1B,OAAO,sBAAsB,UAAU;CACxC;CACA,WAAW,cAAc;CACzB,UAAU;CACV,WAAW;CACX,SAAS;EACR;EACA;EACA;CACD;CACA,eAAe,KAAK;CACpB,mBAAmB,OAAO;EACzB,OAAO,yBAAyB,KAAK;CACtC;CACA,UAAU;EACT,aAAa,IAAI,wBAAwB,MAAM,aAAa;CAC7D;AACD;AACA,MAAM,+BAA+B,IAAI,6BAA6B;AACtE,MAAM,iCAAiC,OAAO,6BAA6B,QAAQ,GAAG,6BAA6B,SAAS,KAAK,CAAC;AAClI,MAAM,mBAAmB,mBAAmB;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"codecs-izq9l1NG-Bb2RnXsx.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/codecs-izq9l1NG.mjs"],"sourcesContent":["import { _ as SQLITE_TIME_TEMPORAL_CODEC_ID, a as SQLITE_DATETIME_CODEC_ID, c as SQLITE_DATE_STRING_CODEC_ID, d as SQLITE_DURATION_STRING_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, g as SQLITE_TIME_STRING_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, i as SQLITE_BOOLEAN_CODEC_ID, l as SQLITE_DATE_TEMPORAL_CODEC_ID, m as SQLITE_REAL_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_DATETIME_STRING_CODEC_ID, p as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_DATETIME_TEMPORAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_DECIMAL_CODEC_ID } from \"./codec-ids-CTshXpbg.mjs\";\nimport { C as sqliteTimeText, S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, f as sqliteDatetimeTextAtMilliseconds, g as sqliteDurationText, h as sqliteDuration, i as sqliteCharacter, l as sqliteDateText, o as sqliteCharacterVarying, p as sqliteDecimal, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from \"./data-types-Djvapurb.mjs\";\nimport { a as sqliteCodec, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from \"./codec-descriptor-DRmF-crq.mjs\";\nimport { a as errorTemporalNonIsoCalendar, c as errorTemporalWrongType, l as sqliteError, n as errorDateTimeUnreadable, r as errorDateTimeUnwritable, t as errorColumnUnreadable } from \"./errors-DxbvEzQp.mjs\";\nimport { t as requireTemporal } from \"./require-temporal-CHWqSDF3.mjs\";\nimport { BinaryExpr, CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, floatToJson, readJsonFloat, readJsonIntegerText, refuseJsonValue, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { hasDigitsBelowAMillisecond, isValidDate } from \"@internal/type-implementations/date\";\nimport { isDecimalText, printedDecimalText } from \"@internal/type-implementations/decimal\";\nimport { booleanFromInteger, integerFromBoolean } from \"@internal/type-implementations/boolean\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { describeValue, temporalFromText, temporalToText } from \"@internal/type-implementations/temporal-text\";\n//#region src/core/blob-json-projection.ts\n/**\n* Projects a blob as a one-element array of its hexadecimal text, and any other value as `otherwise` projects it.\n*\n* SQLite's JSON functions reject a BLOB argument outright, so the encoding has to replace the native conversion rather than post-process it. `hex()` emits uppercase and never wraps. The array is what tells a blob from text: outside a STRICT table a column of any type may hold a blob, and a BLOB column may hold text, which passes through as a row carries it. A codec that reads no bytes receives the array and refuses it, as it refuses the bytes a row carries.\n*/\nconst hexJsonProjectionOr = (expression, otherwise) => CaseExpr.of([{\n\tcondition: BinaryExpr.eq(FunctionCallExpr.of(\"typeof\", [expression]), LiteralExpr.of(\"blob\")),\n\tvalue: FunctionCallExpr.of(\"json_array\", [FunctionCallExpr.of(\"hex\", [expression])])\n}], otherwise);\n/** Projects a blob as the one-element array of its hexadecimal text, and any other value unchanged. */\nconst hexJsonProjection = (expression) => hexJsonProjectionOr(expression, expression);\n//#endregion\n//#region src/core/boolean-codec.ts\nfunction describeReceived$1(value) {\n\treturn typeof value === \"string\" ? JSON.stringify(value) : String(value);\n}\nfunction requireBoolean(value) {\n\tif (typeof value === \"boolean\") return value;\n\tthrow sqliteError(\"RUNTIME.ENCODE_FAILED\", `${SQLITE_BOOLEAN_CODEC_ID} value must be a boolean, got ${describeReceived$1(value)}`, { meta: {\n\t\tcodecId: SQLITE_BOOLEAN_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n}\n/** A stored value that is neither 0 nor 1, named by its column where the read knows it. */\nfunction errorBooleanUnreadable(wire, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_BOOLEAN_CODEC_ID,\n\t\treceived: wire,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"0 or 1\",\n\t\treads: \"0 as false and 1 as true\"\n\t});\n}\nvar SqliteBooleanCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn integerFromBoolean(requireBoolean(value));\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn booleanFromInteger(wire) ?? errorBooleanUnreadable(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(requireBoolean(input));\n\t}\n};\nvar SqliteBooleanDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteBoolean.id;\n\tcodecId = SQLITE_BOOLEAN_CODEC_ID;\n\tjsonType = \"boolean\";\n\ttraits = [\"equality\", \"boolean\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteBooleanCodec(this, sqliteBoolean);\n\t}\n};\nconst sqliteBooleanDescriptor = new SqliteBooleanDescriptor();\nconst sqliteBooleanColumn = () => column(sqliteBooleanDescriptor.factory(), sqliteBooleanDescriptor.codecId, void 0);\n//#endregion\n//#region src/core/date-time-values.ts\nconst DATE_ONLY = /^\\d{4}-\\d{2}-\\d{2}$/;\nconst DATE_TIME_WITHOUT_OFFSET = /^(\\d{4}-\\d{2}-\\d{2})[Tt ](\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?)$/;\n/** A date alone as its midnight in UTC, and a date and time without an offset as UTC. */\nfunction asUtcWhenUnmarked(text) {\n\tif (DATE_ONLY.test(text)) return `${text}T00:00:00Z`;\n\tconst unmarked = DATE_TIME_WITHOUT_OFFSET.exec(text);\n\treturn unmarked === null ? text : `${unmarked[1]}T${unmarked[2]}Z`;\n}\n/**\n* The instant SQLite holds for a row, in milliseconds since 1970, read as `Date` reads it, with text without a UTC offset read as UTC, as SQLite's own date and time functions read it, never in the machine's time zone. A number is milliseconds since 1970, as the Prisma ORM query engine wrote a `DateTime`. Digits below a millisecond are cut, as `Date` cuts them.\n*/\nfunction sqliteInstantMilliseconds(codecId, value) {\n\tconst milliseconds = typeof value === \"bigint\" ? NaN : new Date(typeof value === \"number\" ? value : asUtcWhenUnmarked(value)).getTime();\n\tif (Number.isNaN(milliseconds)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be a date and time as text, or a number of milliseconds since 1970: ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn milliseconds;\n}\nfunction messageOf(cause) {\n\treturn cause instanceof Error ? cause.message : String(cause);\n}\n/** The text a write stores for `value`, in the form `stored` writes; a value `stored` refuses is refused as `RUNTIME.ENCODE_FAILED`. */\nfunction storedTextForWrite(codecId, value, stored) {\n\tif (typeof value !== \"string\") throw errorDateTimeUnwritable({\n\t\tcodecId,\n\t\treceived: describeValue(value),\n\t\tdetail: \"It writes ISO 8601 text.\"\n\t});\n\ttry {\n\t\treturn stored(value);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnwritable({\n\t\t\tcodecId,\n\t\t\treceived: JSON.stringify(value),\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The stored form of the text SQLite returned for a row, as `stored` reads it; text `stored` refuses is refused as `RUNTIME.DECODE_FAILED`. */\nfunction storedTextFromWire(codecId, wire, stored) {\n\tif (typeof wire !== \"string\") throw errorDateTimeUnreadable({\n\t\tcodecId,\n\t\tvalue: String(wire),\n\t\tdetail: `SQLite returned ${describeValue(wire)}, not text.`\n\t});\n\ttry {\n\t\treturn stored(wire);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnreadable({\n\t\t\tcodecId,\n\t\t\tvalue: wire,\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The Temporal value that stored text names, read with `parse`. */\nfunction temporalFromStoredText(identity, text, parse) {\n\tconst read = temporalFromText(requireTemporal({\n\t\tcodecId: identity.codecId,\n\t\toperation: \"decode\"\n\t}), text, parse);\n\tif (read.kind === \"unreadable\") throw errorDateTimeUnreadable({\n\t\tcodecId: identity.codecId,\n\t\tvalue: text,\n\t\tdetail: `${identity.temporalTag} cannot hold it: ${read.detail}. Use ${identity.stringType} to read the column as text.`,\n\t\tcause: read.cause\n\t});\n\treturn read.value;\n}\n/** The text a write stores for a Temporal value, in the form `stored` writes. A value of another kind, in a calendar other than ISO 8601, or with digits below a millisecond is refused. */\nfunction storedTextOfTemporal(identity, value, stored) {\n\tconst encoded = temporalToText(value, identity.temporalTag);\n\tswitch (encoded.kind) {\n\t\tcase \"wrong-type\": throw errorTemporalWrongType(identity.codecId, identity.temporalTag, identity.stringType, encoded.received);\n\t\tcase \"non-iso-calendar\": throw errorTemporalNonIsoCalendar(identity.codecId, encoded.calendarId);\n\t\tcase \"text\":\n\t\t\tif (hasDigitsBelowAMillisecond(encoded.text)) throw errorDateTimeUnwritable({\n\t\t\t\tcodecId: identity.codecId,\n\t\t\t\treceived: `the ${identity.temporalTag} ${encoded.text}`,\n\t\t\t\tdetail: \"It has digits below a millisecond, and the column holds milliseconds. Round it first, as in value.round({ smallestUnit: 'millisecond', roundingMode: 'trunc' }).\"\n\t\t\t});\n\t\t\treturn storedTextForWrite(identity.codecId, encoded.text, stored);\n\t}\n}\n//#endregion\n//#region src/core/date-time-codecs.ts\nconst DATETIME_TEMPORAL = {\n\tcodecId: SQLITE_DATETIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.Instant\",\n\tstringType: \"DatetimeString\"\n};\nconst DATE_TEMPORAL = {\n\tcodecId: SQLITE_DATE_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainDate\",\n\tstringType: \"DateString\"\n};\nconst TIME_TEMPORAL = {\n\tcodecId: SQLITE_TIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainTime\",\n\tstringType: \"TimeString\"\n};\n/** A row's text is what the codec reads, so its JSON is the stored text as it is. */\nconst storedTextJsonProjection = (expression) => expression;\nconst sqliteDatetimeTemporalEncode = (value) => storedTextOfTemporal(DATETIME_TEMPORAL, value, sqliteDatetimeTextAtMilliseconds);\nconst sqliteDateTemporalEncode = (value) => storedTextOfTemporal(DATE_TEMPORAL, value, sqliteDateText);\nconst sqliteTimeTemporalEncode = (value) => storedTextOfTemporal(TIME_TEMPORAL, value, sqliteTimeText);\n/** An instant read as `Temporal.Instant`, from any text or number `sqlite/datetime@1` reads, at millisecond precision. */\nvar SqliteDatetimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqliteDatetimeTemporalEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\tconst milliseconds = sqliteInstantMilliseconds(this.id, wire);\n\t\treturn requireTemporal({\n\t\t\tcodecId: this.id,\n\t\t\toperation: \"decode\"\n\t\t}).Instant.fromEpochMilliseconds(milliseconds);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn temporalFromStoredText(DATETIME_TEMPORAL, value.value, (temporal, text) => temporal.Instant.from(text));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(sqliteDatetimeTemporalEncode(input));\n\t}\n};\nvar SqliteDatetimeTemporalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDatetime.id;\n\tcodecId = SQLITE_DATETIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteDatetimeTemporalCodec(this, sqliteDatetime);\n\t}\n};\nconst sqliteDatetimeTemporalDescriptor = new SqliteDatetimeTemporalDescriptor();\nconst sqliteDatetimeTemporalColumn = () => column(sqliteDatetimeTemporalDescriptor.factory(), sqliteDatetimeTemporalDescriptor.codecId, void 0);\n/** An instant read as the text `sqlite/datetime` stores, `2024-01-01T00:00:00.000Z`, from any text or number `sqlite/datetime@1` reads. A write converts ISO 8601 text with any UTC offset to that form. */\nvar SqliteDatetimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteDatetimeTextAtMilliseconds);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn new Date(sqliteInstantMilliseconds(this.id, wire)).toISOString();\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteDatetimeStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDatetime.id;\n\tcodecId = SQLITE_DATETIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDatetimeStringCodec(this, sqliteDatetime);\n\t}\n};\nconst sqliteDatetimeStringDescriptor = new SqliteDatetimeStringDescriptor();\nconst sqliteDatetimeStringColumn = () => column(sqliteDatetimeStringDescriptor.factory(), sqliteDatetimeStringDescriptor.codecId, void 0);\n/** A calendar date read as the text `sqlite/date` stores, `2024-02-29`. */\nvar SqliteDateStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteDateText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, sqliteDateText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteDateStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDate.id;\n\tcodecId = SQLITE_DATE_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDateStringCodec(this, sqliteDate);\n\t}\n};\nconst sqliteDateStringDescriptor = new SqliteDateStringDescriptor();\nconst sqliteDateStringColumn = () => column(sqliteDateStringDescriptor.factory(), sqliteDateStringDescriptor.codecId, void 0);\n/** A calendar date read as `Temporal.PlainDate`. */\nvar SqliteDateTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqliteDateTemporalEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn temporalFromStoredText(DATE_TEMPORAL, storedTextFromWire(this.id, wire, sqliteDateText), (temporal, text) => temporal.PlainDate.from(text));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn temporalFromStoredText(DATE_TEMPORAL, value.value, (temporal, text) => temporal.PlainDate.from(text));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(sqliteDateTemporalEncode(input));\n\t}\n};\nvar SqliteDateTemporalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDate.id;\n\tcodecId = SQLITE_DATE_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteDateTemporalCodec(this, sqliteDate);\n\t}\n};\nconst sqliteDateTemporalDescriptor = new SqliteDateTemporalDescriptor();\nconst sqliteDateTemporalColumn = () => column(sqliteDateTemporalDescriptor.factory(), sqliteDateTemporalDescriptor.codecId, void 0);\n/** A time of day read as the text `sqlite/time` stores, `09:30:00.000`. A write pads text with fewer fraction digits to three. */\nvar SqliteTimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteTimeText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, sqliteTimeText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteTimeStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteTime.id;\n\tcodecId = SQLITE_TIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteTimeStringCodec(this, sqliteTime);\n\t}\n};\nconst sqliteTimeStringDescriptor = new SqliteTimeStringDescriptor();\nconst sqliteTimeStringColumn = () => column(sqliteTimeStringDescriptor.factory(), sqliteTimeStringDescriptor.codecId, void 0);\n/** A time of day read as `Temporal.PlainTime`. */\nvar SqliteTimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqliteTimeTemporalEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn temporalFromStoredText(TIME_TEMPORAL, storedTextFromWire(this.id, wire, sqliteTimeText), (temporal, text) => temporal.PlainTime.from(text));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn temporalFromStoredText(TIME_TEMPORAL, value.value, (temporal, text) => temporal.PlainTime.from(text));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(sqliteTimeTemporalEncode(input));\n\t}\n};\nvar SqliteTimeTemporalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteTime.id;\n\tcodecId = SQLITE_TIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteTimeTemporalCodec(this, sqliteTime);\n\t}\n};\nconst sqliteTimeTemporalDescriptor = new SqliteTimeTemporalDescriptor();\nconst sqliteTimeTemporalColumn = () => column(sqliteTimeTemporalDescriptor.factory(), sqliteTimeTemporalDescriptor.codecId, void 0);\n/** A length of time read as the ISO 8601 duration it was written as, `PT1H30M`. Its text does not sort in the order of the durations, so it offers no order. */\nvar SqliteDurationStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, sqliteDurationText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, sqliteDurationText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar SqliteDurationStringDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn storedTextJsonProjection(expression);\n\t}\n\tdataType = sqliteDuration.id;\n\tcodecId = SQLITE_DURATION_STRING_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDurationStringCodec(this, sqliteDuration);\n\t}\n};\nconst sqliteDurationStringDescriptor = new SqliteDurationStringDescriptor();\nconst sqliteDurationStringColumn = () => column(sqliteDurationStringDescriptor.factory(), sqliteDurationStringDescriptor.codecId, void 0);\n//#endregion\n//#region src/core/decimal-codec.ts\nconst EXPECTED = \"decimal text, such as \\\"12.50\\\"\";\nfunction describeReceived(value) {\n\treturn typeof value === \"string\" ? JSON.stringify(value) : String(value);\n}\n/** The decimal text the codec writes for an application value: the value without leading zeros or a minus sign on zero. */\nfunction storedDecimalText(value) {\n\tif (typeof value === \"string\" && isDecimalText(value)) return printedDecimalText(value);\n\tthrow sqliteError(\"RUNTIME.ENCODE_FAILED\", `${SQLITE_DECIMAL_CODEC_ID} value must be ${EXPECTED}, got ${describeReceived(value)}`, { meta: {\n\t\tcodecId: SQLITE_DECIMAL_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n}\n/** A stored value the codec cannot read, such as the empty text an earlier fill wrote into a new column, named by its column where the read knows it. */\nfunction errorDecimalUnreadable(wire, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_DECIMAL_CODEC_ID,\n\t\treceived: wire,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"decimal text\",\n\t\treads: EXPECTED\n\t});\n}\nvar SqliteDecimalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedDecimalText(value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tif (typeof wire === \"string\" && isDecimalText(wire)) return wire;\n\t\treturn errorDecimalUnreadable(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(storedDecimalText(input));\n\t}\n};\nvar SqliteDecimalDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteDecimal.id;\n\tcodecId = SQLITE_DECIMAL_CODEC_ID;\n\tjsonType = \"string\";\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteDecimalCodec(this, sqliteDecimal);\n\t}\n};\nconst sqliteDecimalDescriptor = new SqliteDecimalDescriptor();\nconst sqliteDecimalColumn = () => column(sqliteDecimalDescriptor.factory(), sqliteDecimalDescriptor.codecId, void 0);\n//#endregion\n//#region src/core/codecs.ts\n/**\n* Projects the expression unchanged, for codecs whose canonical JSON is what\n* SQLite's own JSON conversion already produces.\n*\n* Identity here is a claim about the target's behaviour, not an absence of one:\n* the codec's conformance cases are what test it, including at the boundaries\n* of the representation where a native conversion would be most likely to\n* diverge.\n*/\nconst identityJsonProjection = (expression) => expression;\n/**\n* Projects an integer as decimal text, a blob as the array of its hex text, and any other value as SQLite writes it in JSON, so a codec reads and refuses through an include what it reads and refuses in a row.\n*\n* The cast is part of the projected expression, so it applies before the JSON constructor sees the value: handed an INTEGER directly, the constructor emits a JSON number, and SQLite's 64-bit range does not survive being read back as a double. Casting the constructor's result would be too late. A blob cast to text would read as the digits its bytes spell, and a REAL cast to text would read as text.\n*/\nconst integerJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: BinaryExpr.eq(FunctionCallExpr.of(\"typeof\", [expression]), LiteralExpr.of(\"integer\")),\n\tvalue: CastExpr.as(expression, \"TEXT\")\n}], hexJsonProjection(expression));\n/**\n* Projects a REAL as SQLite writes it in JSON, except an infinity, which SQLite writes as `9.0e+999` and which becomes the text `Infinity` or `-Infinity` that the codec stores. The test is equality with an infinity, so text or a blob that a REAL column holds outside a STRICT table passes through unchanged.\n*/\nconst floatJsonProjection = (expression) => hexJsonProjectionOr(expression, infinityAsTextJsonProjection(expression));\nconst infinityAsTextJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: BinaryExpr.eq(expression, LiteralExpr.of(Number.POSITIVE_INFINITY)),\n\tvalue: LiteralExpr.of(\"Infinity\")\n}, {\n\tcondition: BinaryExpr.eq(expression, LiteralExpr.of(Number.NEGATIVE_INFINITY)),\n\tvalue: LiteralExpr.of(\"-Infinity\")\n}], expression);\nconst JSON_RETAG_FN = \"json\";\n/**\n* Re-applies SQLite's JSON subtype to a document-valued expression.\n*\n* SQLite carries \"this text is JSON\" as a subtype on the value rather than in\n* its type, and the subtype does not survive a derived table: a document that\n* `json_object` produced arrives one level out as plain text, so the enclosing\n* constructor embeds it as a *string containing JSON* rather than as a\n* document. `json()` re-applies the subtype, which is what makes the value nest\n* as a document again.\n*\n* The loss happens at the first derived-table boundary and does not compound, so\n* a retag is needed where the document is consumed rather than at every level it\n* passes through.\n*\n* Applying this twice is a no-op — SQLite's `json()` is idempotent, and the\n* wrapper collapses rather than nesting so the rendered SQL says so too. It is\n* safe on any valid JSON text, including scalars, and on NULL; it raises\n* `malformed JSON` on text that is not JSON, which is the correct failure for a\n* value that was never a document.\n*/\nconst jsonDocumentRetag = (expression) => isJsonRetag(expression) ? expression : FunctionCallExpr.of(JSON_RETAG_FN, [expression]);\n/** Whether an expression is already a retag, so applying one again would only nest. */\nconst isJsonRetag = (expression) => expression instanceof FunctionCallExpr && expression.fn === JSON_RETAG_FN && expression.args.length === 1;\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** Renders the document a `sqlite/json` value's JSON text holds, when it is a string, number or boolean, and nothing for text that is not JSON. */\nfunction jsonTextLiteral(value) {\n\tif (typeof value !== \"string\") return void 0;\n\ttry {\n\t\treturn renderTsLiteral(JSON.parse(value));\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* SQLite stores an infinity but not NaN, which it turns into NULL, so a float codec on SQLite refuses NaN wherever it writes a value: to a parameter, and to the contract.\n*/\nfunction refuseNaN(codecId, value) {\n\tif (Number.isNaN(value)) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a number other than NaN, which SQLite cannot store`, { meta: {\n\t\tcodecId,\n\t\treceived: \"NaN\"\n\t} });\n\treturn value;\n}\n/** Reads a float's JSON form, which on SQLite has no NaN. */\nfunction readJsonFloatWithoutNaN(codecId, json) {\n\tconst value = readJsonFloat(codecId, json);\n\tif (Number.isNaN(value)) return refuseJsonValue(codecId, \"a finite number or the text Infinity or -Infinity; SQLite cannot store NaN\", json);\n\treturn value;\n}\n/** `sql/float@1` as SQLite stores it: without NaN. */\nvar SqliteFloatCodec = class extends SqlFloatCodec {\n\tasync toWire(value, ctx) {\n\t\treturn super.toWire(refuseNaN(this.id, value), ctx);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn floatWire(this.id, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloatWithoutNaN(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn super.toDataTypeValue(refuseNaN(this.id, input));\n\t}\n};\n/**\n* Requires an application value to be of the JS type the codec reads.\n*\n* A range check reads a value of the wrong type as a value out of range, and\n* reports a number plainly inside the range as outside it — so the type is\n* established first and answered for on its own terms, naming what a caller\n* has to change.\n*/\nconst requireJsType = (codecId, expected, value) => {\n\tif (typeof value === expected) return;\n\tthrow sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a ${expected}, got ${typeof value} ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: typeof value\n\t} });\n};\n/**\n* Writes an application value as the decimal text `sqlite/bigint@1` carries as\n* its canonical JSON.\n*\n* A schema-written literal default (`BigInt @default(0)`) arrives here as a\n* `number`, since a number literal is the only integer a schema language\n* writes, and one that is a safe integer names its value exactly. Past that\n* range the literal was rounded before any of this ran, so the value written is\n* not the value meant — which this refuses rather than minting an exact-looking\n* value from it. A non-integral number is refused on the same terms.\n*/\nconst bigintEncodeJson = (codecId, value) => {\n\tif (typeof value !== \"number\") return encodableInt64(codecId, value).toString();\n\tif (!Number.isSafeInteger(value)) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} number literal must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn BigInt(value).toString();\n};\nconst INT64_RANGE$1 = {\n\tmin: -(2n ** 63n),\n\tmax: 2n ** 63n - 1n\n};\n/** The application value `sqlite/bigint@1` writes: a `bigint` within the signed 64-bit range an SQLite INTEGER holds. */\nconst encodableInt64 = (codecId, value) => {\n\trequireJsType(codecId, \"bigint\", value);\n\tif (value < INT64_RANGE$1.min || value > INT64_RANGE$1.max) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be an integer from ${INT64_RANGE$1.min} to ${INT64_RANGE$1.max}, which SQLite stores, got ${value}`, { meta: {\n\t\tcodecId,\n\t\treceived: value.toString()\n\t} });\n\treturn value;\n};\n/**\n* The application value a number-flavoured integer codec writes: the JS type it reads, an integer within ±(2^53 − 1), the range a `number` holds exactly. The guard throws rather than rounding: past the boundary a `number` silently loses digits, which is the failure mode these codecs exist to refuse.\n*/\nconst encodableSafeInteger = (codecId, value) => {\n\trequireJsType(codecId, \"number\", value);\n\tif (!Number.isSafeInteger(value)) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn Object.is(value, -0) ? 0 : value;\n};\n/** `sqlite/integer`'s stored form, read into a `number`: digit text within the safe integer range. */\nconst safeIntegerFromDigitText = (codecId, json) => Number(readJsonIntegerText(codecId, json, SAFE_INTEGER_BIGINT_RANGE));\n/** A `number` written as `sqlite/integer`'s stored form. */\nconst digitTextOfSafeInteger = (codecId, value) => String(encodableSafeInteger(codecId, value));\nfunction errorIntegerUnreadable(codecId, received, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId,\n\t\treceived,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"an integer within the safe integer range\",\n\t\treads: `integers from ${SAFE_INTEGER_BIGINT_RANGE.min} to ${SAFE_INTEGER_BIGINT_RANGE.max}`\n\t});\n}\n/** A stored value `sqlite/bigint@1` cannot read, named by its column where the read knows it. */\nfunction errorBigintUnreadable(received, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\treceived,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"stored as a 64-bit integer\",\n\t\treads: `integers from ${INT64_RANGE$1.min} to ${INT64_RANGE$1.max}`\n\t});\n}\n/** An integer the driver reads exactly, or the decimal text an include carries, read into a safe-range `number`. A blob, which a row carries as bytes and an include as the array of their hex text, is refused. */\nfunction safeIntegerFromExact(codecId, wire, ctx) {\n\tconst value = typeof wire === \"bigint\" ? wire : typeof wire === \"string\" && DECIMAL_INTEGER.test(wire) ? BigInt(wire) : void 0;\n\tif (value === void 0 || value < SAFE_INTEGER_BIGINT_RANGE.min || value > SAFE_INTEGER_BIGINT_RANGE.max) return errorIntegerUnreadable(codecId, wire, ctx);\n\treturn Number(value);\n}\n/** Reads an INTEGER's wire value into a `number` within the safe integer range. A stored REAL, such as 1.5, is refused too. */\nfunction safeIntegerWire(codecId, wire, ctx) {\n\tif (typeof wire !== \"number\") return safeIntegerFromExact(codecId, wire, ctx);\n\tif (Number.isSafeInteger(wire)) return Object.is(wire, -0) ? 0 : wire;\n\treturn errorIntegerUnreadable(codecId, wire, ctx);\n}\n/**\n* Reads a REAL's wire value: the number the driver returns for a row, an integer outside the safe range as the nearest float, or the text `Infinity` or `-Infinity` an include carries, because JSON has no infinity. Anything else, such as other text or a blob, is refused naming its column.\n*/\nfunction floatWire(codecId, wire, ctx) {\n\tif (typeof wire === \"number\") return wire;\n\tif (typeof wire === \"bigint\") return Number(wire);\n\tif (wire === \"Infinity\") return Number.POSITIVE_INFINITY;\n\tif (wire === \"-Infinity\") return Number.NEGATIVE_INFINITY;\n\tthrow errorColumnUnreadable({\n\t\tcodecId,\n\t\treceived: wire,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"a number\",\n\t\treads: \"a number, or the text Infinity or -Infinity\"\n\t});\n}\n/** The hex text SQLite's `hex()` writes: two uppercase digits for each byte. */\nconst BLOB_HEX_TEXT = /^(?:[0-9A-F]{2})*$/;\n/**\n* Projects a `sql/char@1` value without trailing spaces, as its `decode` reads it on a flat read, so an include reads the same value. SQLite does not pad the value; the rule is the family codec's.\n*/\nconst unpaddedCharJsonProjection = (expression) => FunctionCallExpr.of(\"rtrim\", [expression, LiteralExpr.of(\" \")]);\nconst sqliteSqlCharDescriptor = sqliteCodec(sqlCharDescriptor, {\n\tdataType: sqliteCharacter,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: unpaddedCharJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlCharCodec(descriptor, dataType, params)\n});\nconst sqliteSqlVarcharDescriptor = sqliteCodec(sqlVarcharDescriptor, {\n\tdataType: sqliteCharacterVarying,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlVarcharCodec(descriptor, dataType, params)\n});\n/**\n* `sql/raw@1` as SQLite reads it: a value keeps the shape the driver returns for its storage class. An include carries a BLOB as the array of its hex text that the projection writes, because SQLite's JSON functions refuse a blob; a column value never reaches the JSON constructor as an array, so the array is a BLOB.\n*/\nvar SqliteSqlRawCodec = class extends SqlRawCodec {\n\tasync fromWire(wire, _ctx) {\n\t\tif (!Array.isArray(wire)) return wire;\n\t\tconst [hex] = wire.length === 1 ? wire : [];\n\t\tif (typeof hex !== \"string\" || !BLOB_HEX_TEXT.test(hex)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `${this.id} wire value in an include must be the array of a BLOB's hex text`, { meta: {\n\t\t\tcodecId: this.id,\n\t\t\treceived: String(wire)\n\t\t} });\n\t\treturn new Uint8Array(Buffer.from(hex, \"hex\"));\n\t}\n};\nconst sqliteSqlRawDescriptor = sqliteCodec(sqlRawDescriptor, {\n\tdataType: sqlRawDataType,\n\tjsonProjection: hexJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqliteSqlRawCodec(descriptor, dataType, params)\n});\n/** `sql/int@1` as SQLite stores it: its stored form is `sqlite/integer`'s digit text. */\nvar SqliteSqlIntCodec = class extends SqlIntCodec {\n\tasync fromWire(wire, ctx) {\n\t\treturn safeIntegerWire(this.id, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn safeIntegerFromDigitText(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(digitTextOfSafeInteger(this.id, input));\n\t}\n};\nconst sqliteSqlIntDescriptor = sqliteCodec(sqlIntDescriptor, {\n\tdataType: sqliteInteger,\n\trenderValueLiteral: decimalTextNumberLiteral,\n\tjsonProjection: integerJsonProjection,\n\tfactory: (descriptor, dataType) => () => new SqliteSqlIntCodec(descriptor, dataType)\n});\nconst sqliteSqlFloatDescriptor = sqliteCodec(sqlFloatDescriptor, {\n\tdataType: sqliteReal,\n\trenderValueLiteral: floatNumberLiteral,\n\tjsonProjection: floatJsonProjection,\n\tfactory: (descriptor, dataType) => () => new SqliteFloatCodec(descriptor, dataType)\n});\nvar SqliteTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqliteTextDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = sqliteText.id;\n\tcodecId = SQLITE_TEXT_CODEC_ID;\n\tjsonType = \"string\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteTextCodec(this, sqliteText);\n\t}\n};\nconst sqliteTextDescriptor = new SqliteTextDescriptor();\nconst sqliteTextColumn = () => column(sqliteTextDescriptor.factory(), sqliteTextDescriptor.codecId, void 0);\nvar SqliteIntegerCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodableSafeInteger(SQLITE_INTEGER_CODEC_ID, value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn safeIntegerWire(SQLITE_INTEGER_CODEC_ID, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn safeIntegerFromDigitText(SQLITE_INTEGER_CODEC_ID, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(digitTextOfSafeInteger(SQLITE_INTEGER_CODEC_ID, input));\n\t}\n};\nvar SqliteIntegerDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn integerJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_INTEGER_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteIntegerCodec(this, sqliteInteger);\n\t}\n};\nconst sqliteIntegerDescriptor = new SqliteIntegerDescriptor();\nconst sqliteIntegerColumn = () => column(sqliteIntegerDescriptor.factory(), sqliteIntegerDescriptor.codecId, void 0);\nvar SqliteRealCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn refuseNaN(SQLITE_REAL_CODEC_ID, value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn floatWire(SQLITE_REAL_CODEC_ID, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloatWithoutNaN(SQLITE_REAL_CODEC_ID, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(floatToJson(refuseNaN(SQLITE_REAL_CODEC_ID, input)));\n\t}\n};\nvar SqliteRealDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn floatJsonProjection(expression);\n\t}\n\tdataType = sqliteReal.id;\n\tcodecId = SQLITE_REAL_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn floatNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteRealCodec(this, sqliteReal);\n\t}\n};\nconst sqliteRealDescriptor = new SqliteRealDescriptor();\nconst sqliteRealColumn = () => column(sqliteRealDescriptor.factory(), sqliteRealDescriptor.codecId, void 0);\nvar SqliteBlobCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\t/** A row carries the blob's bytes; an include carries the array of their hex text that its projection writes, because SQLite's JSON functions refuse a blob. Anything else a BLOB column holds is refused. */\n\tasync fromWire(wire, ctx) {\n\t\tif (wire instanceof Uint8Array) return wire;\n\t\tconst [hex] = Array.isArray(wire) && wire.length === 1 ? wire : [];\n\t\tif (typeof hex !== \"string\" || !BLOB_HEX_TEXT.test(hex)) throw errorColumnUnreadable({\n\t\t\tcodecId: SQLITE_BLOB_CODEC_ID,\n\t\t\treceived: wire,\n\t\t\tcolumn: ctx.column,\n\t\t\tnotA: \"a blob\",\n\t\t\treads: \"a blob's bytes\"\n\t\t});\n\t\treturn new Uint8Array(Buffer.from(hex, \"hex\"));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn new Uint8Array(Buffer.from(value.value, \"hex\"));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(Buffer.from(input).toString(\"hex\").toUpperCase());\n\t}\n};\nvar SqliteBlobDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteBlob.id;\n\tcodecId = SQLITE_BLOB_CODEC_ID;\n\tjsonType = \"object\";\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteBlobCodec(this, sqliteBlob);\n\t}\n};\nconst sqliteBlobDescriptor = new SqliteBlobDescriptor();\nconst sqliteBlobColumn = () => column(sqliteBlobDescriptor.factory(), sqliteBlobDescriptor.codecId, void 0);\n/**\n* Reads what SQLite holds for an instant as `Date` reads it, with text without a UTC offset read as UTC, as SQLite's own date and time functions read it, never in the machine's time zone. A number is milliseconds since 1970, as the Prisma ORM query engine wrote a `DateTime`. Digits below a millisecond are cut, as `Date` cuts them.\n*/\nfunction decodeSqliteDatetime(value) {\n\treturn new Date(sqliteInstantMilliseconds(SQLITE_DATETIME_CODEC_ID, value));\n}\n/** The text SQLite holds for an instant: what the codec writes for every row, and for a default. An Invalid Date is refused, naming the codec. */\nfunction encodeSqliteDatetime(value) {\n\tif (!isValidDate(value)) throw errorDateTimeUnwritable({\n\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\treceived: \"an Invalid Date\",\n\t\tdetail: \"Pass a Date that holds an instant.\"\n\t});\n\treturn value.toISOString();\n}\nvar SqliteDatetimeCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodeSqliteDatetime(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn decodeSqliteDatetime(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn new Date(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(encodeSqliteDatetime(input));\n\t}\n};\nvar SqliteDatetimeDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = sqliteDatetime.id;\n\tcodecId = SQLITE_DATETIME_CODEC_ID;\n\tjsonType = \"string\";\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqliteDatetimeCodec(this, sqliteDatetime);\n\t}\n};\nconst sqliteDatetimeDescriptor = new SqliteDatetimeDescriptor();\nconst sqliteDatetimeColumn = () => column(sqliteDatetimeDescriptor.factory(), sqliteDatetimeDescriptor.codecId, void 0);\n/** A stored value `sqlite/json@1` cannot read, named by its column where the read knows it. */\nfunction errorJsonUnreadable(received, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: SQLITE_JSON_CODEC_ID,\n\t\treceived,\n\t\tcolumn: ctx.column,\n\t\tnotA: \"JSON text\",\n\t\treads: \"JSON text as the document it holds\"\n\t});\n}\nvar SqliteJsonCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn JSON.stringify(value);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tif (wire instanceof Uint8Array || Array.isArray(wire)) return errorJsonUnreadable(wire, ctx);\n\t\tif (typeof wire !== \"string\") return wire;\n\t\ttry {\n\t\t\treturn blindCast(JSON.parse(wire));\n\t\t} catch {\n\t\t\treturn errorJsonUnreadable(wire, ctx);\n\t\t}\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn blindCast(JSON.parse(value.value));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(JSON.stringify(input));\n\t}\n};\n/**\n* The column stores the document's JSON text and the stored form is that text, so the stored text is projected as it is: a string the enclosing JSON constructor embeds as a string. A blob is projected as the array of its hex text, which the codec refuses, because SQLite's JSON functions refuse a blob.\n*/\nvar SqliteJsonDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tdataType = sqliteJson.id;\n\tcodecId = SQLITE_JSON_CODEC_ID;\n\tjsonType = \"any\";\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn jsonTextLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteJsonCodec(this, sqliteJson);\n\t}\n};\nconst sqliteJsonDescriptor = new SqliteJsonDescriptor();\nconst sqliteJsonColumn = () => column(sqliteJsonDescriptor.factory(), sqliteJsonDescriptor.codecId, void 0);\nvar SqliteBigintCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodableInt64(SQLITE_BIGINT_CODEC_ID, value);\n\t}\n\t/**\n\t* The driver reads an integer outside the safe range as an exact `bigint` and one inside it as a `number`; an include and a wide aggregate carry decimal text. Anything else, such as a stored REAL, text or a blob, is refused naming its column.\n\t*/\n\tasync fromWire(wire, ctx) {\n\t\tif (typeof wire === \"bigint\") return wire;\n\t\tif (typeof wire === \"number\" && Number.isSafeInteger(wire)) return BigInt(wire);\n\t\tif (typeof wire === \"string\" && DECIMAL_INTEGER.test(wire)) return BigInt(wire);\n\t\treturn errorBigintUnreadable(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn BigInt(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(bigintEncodeJson(SQLITE_BIGINT_CODEC_ID, input));\n\t}\n};\nvar SqliteBigintDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn integerJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_BIGINT_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteBigintCodec(this, sqliteInteger);\n\t}\n};\nconst sqliteBigintDescriptor = new SqliteBigintDescriptor();\nconst sqliteBigintColumn = () => column(sqliteBigintDescriptor.factory(), sqliteBigintDescriptor.codecId, void 0);\n/**\n* A SQLite INTEGER decoded as a JS `number`, for columns whose values stay\n* within the safe integer range ±(2^53 − 1). Both directions guard rather than\n* round: decode (wire and JSON) and encode throw a structured error on\n* out-of-range or non-integral input. The canonical JSON is the decimal text\n* `sqlite/integer` carries, which every codec of that data type shares.\n*/\nvar SqliteBigintNumberCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn encodableSafeInteger(SQLITE_BIGINT_NUMBER_CODEC_ID, value);\n\t}\n\t/**\n\t* The driver hands an INTEGER over as a `number`, or as a `bigint` outside the safe range; a bigint (or decimal text) is range-checked exactly before any conversion to `number`, so an out-of-range value throws rather than rounds. A blob is refused.\n\t*/\n\tasync fromWire(wire, ctx) {\n\t\treturn safeIntegerWire(SQLITE_BIGINT_NUMBER_CODEC_ID, wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn safeIntegerFromDigitText(SQLITE_BIGINT_NUMBER_CODEC_ID, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(digitTextOfSafeInteger(SQLITE_BIGINT_NUMBER_CODEC_ID, input));\n\t}\n};\nvar SqliteBigintNumberDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn integerJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_BIGINT_NUMBER_CODEC_ID;\n\tjsonType = \"number\";\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteBigintNumberCodec(this, sqliteInteger);\n\t}\n};\nconst sqliteBigintNumberDescriptor = new SqliteBigintNumberDescriptor();\nconst sqliteBigintNumberColumn = () => column(sqliteBigintNumberDescriptor.factory(), sqliteBigintNumberDescriptor.codecId, void 0);\nconst codecDescriptors = defineSqliteCodecs([\n\tsqliteSqlCharDescriptor,\n\tsqliteSqlVarcharDescriptor,\n\tsqliteSqlIntDescriptor,\n\tsqliteSqlFloatDescriptor,\n\tsqliteSqlRawDescriptor,\n\tsqliteTextDescriptor,\n\tsqliteIntegerDescriptor,\n\tsqliteRealDescriptor,\n\tsqliteBlobDescriptor,\n\tsqliteDatetimeDescriptor,\n\tsqliteDatetimeTemporalDescriptor,\n\tsqliteDatetimeStringDescriptor,\n\tsqliteDateStringDescriptor,\n\tsqliteDateTemporalDescriptor,\n\tsqliteTimeStringDescriptor,\n\tsqliteTimeTemporalDescriptor,\n\tsqliteDurationStringDescriptor,\n\tsqliteJsonDescriptor,\n\tsqliteBigintDescriptor,\n\tsqliteBigintNumberDescriptor,\n\tsqliteDecimalDescriptor,\n\tsqliteBooleanDescriptor\n]);\n//#endregion\nexport { sqliteDurationStringColumn as _, sqliteBigintNumberColumn as a, sqliteBooleanColumn as b, sqliteIntegerColumn as c, sqliteTextColumn as d, sqliteDecimalColumn as f, sqliteDatetimeTemporalColumn as g, sqliteDatetimeStringColumn as h, sqliteBigintColumn as i, sqliteJsonColumn as l, sqliteDateTemporalColumn as m, encodeSqliteDatetime as n, sqliteBlobColumn as o, sqliteDateStringColumn as p, jsonDocumentRetag as r, sqliteDatetimeColumn as s, codecDescriptors as t, sqliteRealColumn as u, sqliteTimeStringColumn as v, sqliteTimeT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BAA+B,cAAc,sBAAsB;CACtE,eAAe,YAAY;EAC1B,OAAO,sBAAsB,UAAU;CACxC;CACA,WAAW,cAAc;CACzB,UAAU;CACV,WAAW;CACX,SAAS;EACR;EACA;EACA;CACD;CACA,eAAe,KAAK;CACpB,mBAAmB,OAAO;EACzB,OAAO,yBAAyB,KAAK;CACtC;CACA,UAAU;EACT,aAAa,IAAI,wBAAwB,MAAM,aAAa;CAC7D;AACD;AACA,MAAM,+BAA+B,IAAI,6BAA6B;AACtE,MAAM,iCAAiC,OAAO,6BAA6B,QAAQ,GAAG,6BAA6B,SAAS,KAAK,CAAC;AAClI,MAAM,mBAAmB,mBAAmB;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as SQLITE_DATETIME_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, p as SQLITE_JSON_CODEC_ID } from "./codec-ids-CTshXpbg-tcdbf_VC.mjs";
|
|
2
|
-
import { r as SQLITE_NOW_EXPRESSION } from "./datetime-text-
|
|
2
|
+
import { r as SQLITE_NOW_EXPRESSION } from "./datetime-text-DPjoF6HJ-se0mLEbc.mjs";
|
|
3
3
|
import { r as createTable } from "./ddl-CgkyurGo-B2o4mSIT.mjs";
|
|
4
4
|
import { TableSource } from "@prisma/orm-family-sql/relational-core/ast";
|
|
5
5
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
@@ -88,4 +88,4 @@ function buildControlTableBootstrapQueries() {
|
|
|
88
88
|
//#endregion
|
|
89
89
|
export { jsonText as a, integer as i, buildSignMarkerBootstrapQueries as n, sqliteTable as o, datetime as r, text as s, buildControlTableBootstrapQueries as t };
|
|
90
90
|
|
|
91
|
-
//# sourceMappingURL=contract-free-
|
|
91
|
+
//# sourceMappingURL=contract-free-B5S1OSEd.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-free-
|
|
1
|
+
{"version":3,"file":"contract-free-B5S1OSEd.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/contract-free.mjs"],"sourcesContent":["import { a as SQLITE_DATETIME_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, p as SQLITE_JSON_CODEC_ID } from \"./codec-ids-CTshXpbg.mjs\";\nimport { r as SQLITE_NOW_EXPRESSION } from \"./datetime-text-DPjoF6HJ.mjs\";\nimport { a as tableExistsAst, i as indexExistsAst, n as columnExistsAst, t as createTable } from \"./ddl-CgkyurGo.mjs\";\nimport { TableSource } from \"@internal/sql-relational-core/ast\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit, table } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/columns.ts\nconst desc = (codecId, opts) => ({\n\tcodecId,\n\tnullable: opts?.nullable ?? false\n});\nconst text = (opts) => desc(SQLITE_TEXT_CODEC_ID, opts);\nconst integer = (opts) => desc(SQLITE_INTEGER_CODEC_ID, opts);\nconst jsonText = (opts) => desc(SQLITE_JSON_CODEC_ID, opts);\nconst datetime = (opts) => desc(SQLITE_DATETIME_CODEC_ID, opts);\n/**\n* Declare a SQLite control-plane table with a typed column schema. SQLite tables\n* are addressed by a flat name (no schema prefix).\n*\n* ```ts\n* const marker = sqliteTable('_prisma_marker', {\n* space: text(),\n* core_hash: text(),\n* updated_at: datetime(),\n* });\n* ```\n*/\nfunction sqliteTable(name, columns) {\n\treturn table(TableSource.named(name), columns);\n}\n//#endregion\n//#region src/contract-free/control-bootstrap.ts\nconst markerColumns = [\n\tcol(\"space\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true,\n\t\tdefault: lit(APP_SPACE_ID)\n\t}),\n\tcol(\"core_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"profile_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"contract_json\", \"TEXT\"),\n\tcol(\"canonical_version\", \"INTEGER\"),\n\tcol(\"updated_at\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: fn(SQLITE_NOW_EXPRESSION)\n\t}),\n\tcol(\"app_tag\", \"TEXT\"),\n\tcol(\"meta\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t}),\n\tcol(\"invariants\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"[]\")\n\t})\n];\nconst ledgerColumns = [\n\tcol(\"id\", \"INTEGER PRIMARY KEY AUTOINCREMENT\"),\n\tcol(\"created_at\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: fn(SQLITE_NOW_EXPRESSION)\n\t}),\n\tcol(\"space\", \"TEXT\", { notNull: true }),\n\tcol(\"migration_name\", \"TEXT\", { notNull: true }),\n\tcol(\"migration_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"origin_core_hash\", \"TEXT\"),\n\tcol(\"origin_profile_hash\", \"TEXT\"),\n\tcol(\"destination_core_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"destination_profile_hash\", \"TEXT\"),\n\tcol(\"contract_json_before\", \"TEXT\"),\n\tcol(\"contract_json_after\", \"TEXT\"),\n\tcol(\"operations\", \"TEXT\", { notNull: true })\n];\nconst markerTable = createTable({\n\ttable: \"_prisma_marker\",\n\tifNotExists: true,\n\tcolumns: markerColumns\n});\nconst ledgerTable = createTable({\n\ttable: \"_prisma_ledger\",\n\tifNotExists: true,\n\tcolumns: ledgerColumns\n});\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [markerTable];\n}\nfunction buildControlTableBootstrapQueries() {\n\treturn [markerTable, ledgerTable];\n}\n//#endregion\nexport { buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, columnExistsAst, createTable, datetime, indexExistsAst, integer, jsonText, sqliteTable, tableExistsAst, text };\n\n//# sourceMappingURL=contract-free.mj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Q,EAAE,SAAS,KAAK,CAAC;CACtD,IAAI,4BAA4B,MAAM;CACtC,IAAI,wBAAwB,MAAM;CAClC,IAAI,uBAAuB,MAAM;CACjC,IAAI,cAAc,QAAQ,EAAE,SAAS,KAAK,CAAC;AAC5C;AACA,MAAM,cAAc,YAAY;CAC/B,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,cAAc,YAAY;CAC/B,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,SAAS,kCAAkC;CAC1C,OAAO,CAAC,WAAW;AACpB;AACA,SAAS,oCAAoC;CAC5C,OAAO,CAAC,aAAa,WAAW;AACjC"}
|
package/dist/{data-type-entries-C0WkKiPF-CKPYj4OT.mjs → data-type-entries-DaT4D2GV-DE0V_N6k.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as sqliteTimeText, S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, d as sqliteDatetimeText, g as sqliteDurationText, h as sqliteDuration, l as sqliteDateText, n as sqliteBlobFromHexText, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from "./data-types-
|
|
1
|
+
import { C as sqliteTimeText, S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, d as sqliteDatetimeText, g as sqliteDurationText, h as sqliteDuration, l as sqliteDateText, n as sqliteBlobFromHexText, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from "./data-types-Djvapurb-BR-Y4NWN.mjs";
|
|
2
2
|
import { createNumberClassifier, numeralText, parseJsonText, signedRange } from "@prisma/orm-framework/components/codec";
|
|
3
3
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
4
4
|
import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
|
|
5
|
-
//#region ../../../3-targets/sqlite/1-target/dist/data-type-entries-
|
|
5
|
+
//#region ../../../3-targets/sqlite/1-target/dist/data-type-entries-DaT4D2GV.mjs
|
|
6
6
|
const classifySqliteNumber = createNumberClassifier({
|
|
7
7
|
integers: [{
|
|
8
8
|
type: sqliteInteger.id,
|
|
@@ -117,4 +117,4 @@ function sqliteDataTypeEntries() {
|
|
|
117
117
|
//#endregion
|
|
118
118
|
export { sqliteDataTypeEntries as t };
|
|
119
119
|
|
|
120
|
-
//# sourceMappingURL=data-type-entries-
|
|
120
|
+
//# sourceMappingURL=data-type-entries-DaT4D2GV-DE0V_N6k.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-type-entries-
|
|
1
|
+
{"version":3,"file":"data-type-entries-DaT4D2GV-DE0V_N6k.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/data-type-entries-DaT4D2GV.mjs"],"sourcesContent":["import { C as sqliteTimeText, S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, d as sqliteDatetimeText, g as sqliteDurationText, h as sqliteDuration, l as sqliteDateText, n as sqliteBlobFromHexText, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from \"./data-types-Djvapurb.mjs\";\nimport { createNumberClassifier, numeralText, parseJsonText, signedRange } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/core/data-type-entries.ts\nconst classifySqliteNumber = createNumberClassifier({\n\tintegers: [{\n\t\ttype: sqliteInteger.id,\n\t\tform: \"text\",\n\t\t...signedRange(64)\n\t}],\n\tfraction: {\n\t\ttype: sqliteReal.id,\n\t\tform: \"number\"\n\t},\n\twords: {\n\t\ttype: sqliteReal.id,\n\t\tform: \"text\"\n\t}\n});\nfunction printNumber(value) {\n\treturn typeof value === \"number\" ? numeralText(value) : String(value);\n}\nfunction readBoolean(text) {\n\tif (text === \"true\" || text === \"false\") return text === \"true\";\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `\"${text}\" is not a boolean.`, {\n\t\twhy: \"The only text a boolean reads is true or false.\",\n\t\tfix: \"Use true or false.\"\n\t});\n}\nfunction sqliteDataTypeEntries() {\n\treturn {\n\t\t[sqliteText.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"string\",\n\t\t\t\tparse: (text) => text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Text.\"\n\t\t},\n\t\t[sqliteReal.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"number\",\n\t\t\t\ttypes: [sqliteInteger.id, sqliteReal.id],\n\t\t\t\tclassify: classifySqliteNumber\n\t\t\t},\n\t\t\tprint: printNumber,\n\t\t\tdocumentation: \"A number, whose type comes from its own size and precision.\"\n\t\t},\n\t\t[sqliteBoolean.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"boolean\",\n\t\t\t\tparse: readBoolean\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"A boolean, written true or false.\"\n\t\t},\n\t\t[sqliteJson.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"json\",\n\t\t\t\tparse: (text) => canonicalizeJson(parseJsonText(text))\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Reads the text as a JSON document and stores its JSON text as the default value.\"\n\t\t},\n\t\t[sqliteBlob.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"blob\",\n\t\t\t\tparse: sqliteBlobFromHexText\n\t\t\t},\n\t\t\tprint: (value) => String(value).toLowerCase(),\n\t\t\tdocumentation: \"Bytes, written as hex text, two digits for each byte, as in blob`68656c6c6f`.\"\n\t\t},\n\t\t[sqliteDatetime.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"datetime\",\n\t\t\t\tparse: sqliteDatetimeText\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"An instant, as in datetime`2024-01-01T00:00:00Z`. Reads ISO 8601 with a UTC offset and stores the instant in UTC with three fraction digits, the text every row holds.\"\n\t\t},\n\t\t[sqliteDate.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"date\",\n\t\t\t\tparse: sqliteDateText\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"A calendar date, as in date`2024-02-29`, in the years 0000 to 9999, stored as the text every row holds.\"\n\t\t},\n\t\t[sqliteTime.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"time\",\n\t\t\t\tparse: sqliteTimeText\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"A time of day without a UTC offset, as in time`09:30:00`. Stores it with three fraction digits, as in 09:30:00.000, the text every row holds.\"\n\t\t},\n\t\t[sqliteDuration.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"duration\",\n\t\t\t\tparse: sqliteDurationText\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"A length of time, as in duration`PT1H30M`. Reads an ISO 8601 duration and stores it as written.\"\n\t\t}\n\t};\n}\n//#endregion\nexport { sqliteDataTypeEntries as t };\n\n//# sourceMappingURL=data-type-entries-DaT4D2GV.mjs.map"],"mappings":";;;;;AAKA,MAAM,uBAAuB,uBAAuB;CACnD,UAAU,CAAC;EACV,MAAM,cAAc;EACpB,MAAM;EACN,GAAG,YAAY,EAAE;CAClB,CAAC;CACD,UAAU;EACT,MAAM,WAAW;EACjB,MAAM;CACP;CACA,OAAO;EACN,MAAM,WAAW;EACjB,MAAM;CACP;AACD,CAAC;AACD,SAAS,YAAY,OAAO;CAC3B,OAAO,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI,OAAO,KAAK;AACrE;AACA,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AAM;IACN,KAAK;IACL,OAAO;GACR;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;CACD;AACD"}
|
|
@@ -6,7 +6,7 @@ import { withThreeFractionDigits, withoutZerosBelowAMillisecond } from "@prisma/
|
|
|
6
6
|
import { isDecimalText, printedDecimalText } from "@prisma/orm-framework/type-implementations/decimal";
|
|
7
7
|
import { ISO_DURATION_AS_WRITTEN } from "@prisma/orm-framework/type-implementations/duration";
|
|
8
8
|
import { type } from "arktype";
|
|
9
|
-
//#region ../../../3-targets/sqlite/1-target/dist/data-types-
|
|
9
|
+
//#region ../../../3-targets/sqlite/1-target/dist/data-types-Djvapurb.mjs
|
|
10
10
|
/** Digit text as `real` stores it: the nearest double, as SQLite converts an integer to a real. */
|
|
11
11
|
const asReal = (value) => typeof value === "string" ? Number(value) : refuseWrongShape(value, "digit text");
|
|
12
12
|
/** A type written and reported by `name` and nothing else. */
|
|
@@ -51,7 +51,10 @@ function sqliteBlobFromHexText(text) {
|
|
|
51
51
|
return text.toUpperCase();
|
|
52
52
|
}
|
|
53
53
|
/** The length of `character` and `character varying`, which SQLite accepts and does not enforce, up to SQLite's largest string length, so a double holds every accepted length exactly. */
|
|
54
|
-
const sqliteCharacterLengthParams = type({
|
|
54
|
+
const sqliteCharacterLengthParams = type({
|
|
55
|
+
"+": "reject",
|
|
56
|
+
"length?": `number.integer >= 1 & number.integer <= 2147483647`
|
|
57
|
+
});
|
|
55
58
|
/** A character type is written without its length, so its normal form has none. */
|
|
56
59
|
const withoutLength = ({ length: _length, ...rest }) => rest;
|
|
57
60
|
const sqliteCharacter = sqlDataType("sqlite/character", {
|
|
@@ -233,4 +236,4 @@ const sqliteTextDataTypes = [
|
|
|
233
236
|
//#endregion
|
|
234
237
|
export { sqliteTimeText as C, sqliteTime as S, sqliteInteger as _, sqliteCharacterLengthParams as a, sqliteText as b, sqliteDate as c, sqliteDatetimeText as d, sqliteDatetimeTextAtMilliseconds as f, sqliteDurationText as g, sqliteDuration as h, sqliteCharacter as i, sqliteDateText as l, sqliteDecimalText as m, sqliteBlobFromHexText as n, sqliteCharacterVarying as o, sqliteDecimal as p, sqliteBoolean as r, sqliteDataTypes as s, sqliteBlob as t, sqliteDatetime as u, sqliteJson as v, sqliteTextDataTypes as x, sqliteReal as y };
|
|
235
238
|
|
|
236
|
-
//# sourceMappingURL=data-types-
|
|
239
|
+
//# sourceMappingURL=data-types-Djvapurb-BR-Y4NWN.mjs.map
|