@prisma/orm-target-sqlite 0.16.0 → 0.17.0-dev.10

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.
Files changed (72) hide show
  1. package/dist/{adapter-wc9p_v2Z-y8pzqMfG.mjs → adapter-BI0XGOVw-Df6PZFmg.mjs} +6 -6
  2. package/dist/{adapter-wc9p_v2Z-y8pzqMfG.mjs.map → adapter-BI0XGOVw-Df6PZFmg.mjs.map} +1 -1
  3. package/dist/adapter-D7zw14p5.d.mts +2 -0
  4. package/dist/{adapter-DizMsGCb-n4h4w8ms.d.mts → adapter-DEYUC-KO-DO_abhIq.d.mts} +12 -4
  5. package/dist/adapter-DEYUC-KO-DO_abhIq.d.mts.map +1 -0
  6. package/dist/adapter.d.mts +11 -10
  7. package/dist/adapter.mjs +2 -2
  8. package/dist/adapter__adapter.d.mts +3 -3
  9. package/dist/adapter__adapter.mjs +1 -1
  10. package/dist/adapter__codec-types.d.mts +3 -3
  11. package/dist/adapter__control.d.mts +1 -1
  12. package/dist/adapter__control.mjs +2 -2
  13. package/dist/adapter__control.mjs.map +1 -1
  14. package/dist/adapter__runtime.d.mts +1 -1
  15. package/dist/adapter__runtime.mjs +3 -3
  16. package/dist/adapter__runtime.mjs.map +1 -1
  17. package/dist/adapter__sql-renderer.d.mts +3 -0
  18. package/dist/adapter__sql-renderer.mjs +2 -0
  19. package/dist/adapter__types.d.mts +2 -2
  20. package/dist/aggregates-BGuKJwfI.d.mts +10 -0
  21. package/dist/aggregates-BGuKJwfI.d.mts.map +1 -0
  22. package/dist/aggregates-CTDRDyvD.mjs +95 -0
  23. package/dist/aggregates-CTDRDyvD.mjs.map +1 -0
  24. package/dist/{codec-descriptor-BcgD9f3L-BjEkn9Ob.d.mts → codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts} +2 -2
  25. package/dist/{codec-descriptor-BcgD9f3L-BjEkn9Ob.d.mts.map → codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts.map} +1 -1
  26. package/dist/codec-descriptor-rFuZ9DzY-CKRIRxah.d.mts +1 -0
  27. package/dist/codec-descriptor-vwfD3BMy.d.mts +2 -0
  28. package/dist/codec-types-BV3IjK44.d.mts +2 -0
  29. package/dist/codec-types-C29741cn.d.mts +1 -0
  30. package/dist/{codec-types-DKB--ltR-CIuvX0zx.d.mts → codec-types-DOyikA9Q-DVHiIZxI.d.mts} +5 -5
  31. package/dist/{codec-types-DKB--ltR-CIuvX0zx.d.mts.map → codec-types-DOyikA9Q-DVHiIZxI.d.mts.map} +1 -1
  32. package/dist/codecs-BVBvwzGc.d.mts +1 -0
  33. package/dist/{codecs-CM_2W3uA.mjs → codecs-BaoqGdxT.mjs} +13 -3
  34. package/dist/{codecs-CM_2W3uA.mjs.map → codecs-BaoqGdxT.mjs.map} +1 -1
  35. package/dist/{codecs-1-oOsTPG-Bv518Lbm.d.mts → codecs-CEh66QoN-oCsdncEe.d.mts} +12 -6
  36. package/dist/{codecs-1-oOsTPG-Bv518Lbm.d.mts.map → codecs-CEh66QoN-oCsdncEe.d.mts.map} +1 -1
  37. package/dist/{control-cahq7u71.d.mts → control-CLirKz11.d.mts} +4 -4
  38. package/dist/{control-cahq7u71.d.mts.map → control-CLirKz11.d.mts.map} +1 -1
  39. package/dist/descriptor-meta-DjKgG4z5-CDdHwPoG.mjs +34 -0
  40. package/dist/descriptor-meta-DjKgG4z5-CDdHwPoG.mjs.map +1 -0
  41. package/dist/{pack-BfwyQ0b3.d.mts → pack-Cnu6UOJx.d.mts} +2 -2
  42. package/dist/{pack-BfwyQ0b3.d.mts.map → pack-Cnu6UOJx.d.mts.map} +1 -1
  43. package/dist/{planner-DiGcIjl1-QnNAhVmX.mjs → planner-DiGcIjl1-oFtDTY7-.mjs} +2 -2
  44. package/dist/{planner-DiGcIjl1-QnNAhVmX.mjs.map → planner-DiGcIjl1-oFtDTY7-.mjs.map} +1 -1
  45. package/dist/{runtime-tbBYTw7Z.d.mts → runtime-C5J9fusd.d.mts} +2 -2
  46. package/dist/{runtime-tbBYTw7Z.d.mts.map → runtime-C5J9fusd.d.mts.map} +1 -1
  47. package/dist/sql-renderer-KX6hn_tg.d.mts +1 -0
  48. package/dist/target.d.mts +9 -8
  49. package/dist/target.mjs +5 -4
  50. package/dist/target__aggregates.d.mts +2 -0
  51. package/dist/target__aggregates.mjs +2 -0
  52. package/dist/target__codec-descriptor.d.mts +2 -2
  53. package/dist/target__codec-types.d.mts +3 -3
  54. package/dist/target__codecs.d.mts +2 -2
  55. package/dist/target__codecs.mjs +1 -1
  56. package/dist/target__control.mjs +1 -1
  57. package/dist/target__pack.d.mts +1 -1
  58. package/dist/target__planner.mjs +1 -1
  59. package/dist/types-B7e2QVEx.d.mts +1 -0
  60. package/dist/{types-C5FSREvo-Bm6N5Kog.d.mts → types-C5FSREvo-CwUlKK34.d.mts} +4 -4
  61. package/dist/{types-C5FSREvo-Bm6N5Kog.d.mts.map → types-C5FSREvo-CwUlKK34.d.mts.map} +1 -1
  62. package/package.json +16 -9
  63. package/dist/adapter-DizMsGCb-n4h4w8ms.d.mts.map +0 -1
  64. package/dist/adapter-m_BtnNSn.d.mts +0 -2
  65. package/dist/codec-descriptor-CyCQXvSl.d.mts +0 -2
  66. package/dist/codec-descriptor-rFuZ9DzY-DO0k8l6N.d.mts +0 -1
  67. package/dist/codec-types-Tw3EFTjf.d.mts +0 -1
  68. package/dist/codec-types-wPDlPoD7.d.mts +0 -2
  69. package/dist/codecs-j-8RDkOt.d.mts +0 -1
  70. package/dist/descriptor-meta-CbYkqTkO-DEJNrICG.mjs +0 -30
  71. package/dist/descriptor-meta-CbYkqTkO-DEJNrICG.mjs.map +0 -1
  72. package/dist/types-DiH2oWUJ.d.mts +0 -1
@@ -1,6 +1,6 @@
1
- import { i as sqliteCodecDescriptorRegistry } from "./codecs-CM_2W3uA.mjs";
2
- import { i as createSqliteAdapterWithCodecRegistry, n as assembleSqliteCodecRegistry, s as sqliteRawCodecInferer } from "./adapter-wc9p_v2Z-y8pzqMfG.mjs";
3
- import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-CbYkqTkO-DEJNrICG.mjs";
1
+ import { i as sqliteCodecDescriptorRegistry } from "./codecs-BaoqGdxT.mjs";
2
+ import { c as sqliteRawCodecInferer, i as createSqliteAdapterWithCodecRegistry, n as assembleSqliteCodecRegistry } from "./adapter-BI0XGOVw-Df6PZFmg.mjs";
3
+ import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DjKgG4z5-CDdHwPoG.mjs";
4
4
  import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
5
5
  import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
6
6
  import { generateId } from "@prisma/orm-framework/ids/runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/runtime.mjs"],"sourcesContent":["import { a as assembleSqliteCodecRegistry, n as createSqliteAdapterWithCodecRegistry, r as sqliteRawCodecInferer } from \"./adapter-wc9p_v2Z.mjs\";\nimport { t as sqliteAdapterDescriptorMeta } from \"./descriptor-meta-CbYkqTkO.mjs\";\nimport { sqliteCodecDescriptorRegistry } from \"@internal/target-sqlite/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\n//#region src/core/runtime-adapter.ts\nfunction createSqliteMutationDefaultGenerators() {\n\treturn [...builtinGeneratorIds.map((id) => ({\n\t\tid,\n\t\tgenerate: (params) => {\n\t\t\treturn generateId(params ? {\n\t\t\t\tid,\n\t\t\t\tparams\n\t\t\t} : { id });\n\t\t},\n\t\tstability: \"field\"\n\t})), timestampNowRuntimeGenerator()];\n}\nconst sqliteRuntimeAdapterDescriptor = {\n\t...sqliteAdapterDescriptorMeta,\n\tcodecs: () => Array.from(sqliteCodecDescriptorRegistry.values()),\n\tmutationDefaultGenerators: createSqliteMutationDefaultGenerators,\n\trawCodecInferer: sqliteRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createSqliteAdapterWithCodecRegistry(assembleSqliteCodecRegistry(stack.target, stack.extensions));\n\t}\n};\n//#endregion\nexport { sqliteRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,wCAAwC;CAChD,OAAO,CAAC,GAAG,oBAAoB,KAAK,QAAQ;EAC3C;EACA,WAAW,WAAW;GACrB,OAAO,WAAW,SAAS;IAC1B;IACA;GACD,IAAI,EAAE,GAAG,CAAC;EACX;EACA,WAAW;CACZ,EAAE,GAAG,6BAA6B,CAAC;AACpC;AACA,MAAM,iCAAiC;CACtC,GAAG;CACH,cAAc,MAAM,KAAK,8BAA8B,OAAO,CAAC;CAC/D,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,qCAAqC,4BAA4B,MAAM,QAAQ,MAAM,UAAU,CAAC;CACxG;AACD"}
1
+ {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/runtime.mjs"],"sourcesContent":["import { i as sqliteRawCodecInferer, n as createSqliteAdapterWithCodecRegistry, o as assembleSqliteCodecRegistry } from \"./adapter-BI0XGOVw.mjs\";\nimport { t as sqliteAdapterDescriptorMeta } from \"./descriptor-meta-DjKgG4z5.mjs\";\nimport { sqliteCodecDescriptorRegistry } from \"@internal/target-sqlite/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\n//#region src/core/runtime-adapter.ts\nfunction createSqliteMutationDefaultGenerators() {\n\treturn [...builtinGeneratorIds.map((id) => ({\n\t\tid,\n\t\tgenerate: (params) => {\n\t\t\treturn generateId(params ? {\n\t\t\t\tid,\n\t\t\t\tparams\n\t\t\t} : { id });\n\t\t},\n\t\tstability: \"field\"\n\t})), timestampNowRuntimeGenerator()];\n}\nconst sqliteRuntimeAdapterDescriptor = {\n\t...sqliteAdapterDescriptorMeta,\n\tcodecs: () => Array.from(sqliteCodecDescriptorRegistry.values()),\n\tmutationDefaultGenerators: createSqliteMutationDefaultGenerators,\n\trawCodecInferer: sqliteRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createSqliteAdapterWithCodecRegistry(assembleSqliteCodecRegistry(stack.target, stack.extensions));\n\t}\n};\n//#endregion\nexport { sqliteRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,wCAAwC;CAChD,OAAO,CAAC,GAAG,oBAAoB,KAAK,QAAQ;EAC3C;EACA,WAAW,WAAW;GACrB,OAAO,WAAW,SAAS;IAC1B;IACA;GACD,IAAI,EAAE,GAAG,CAAC;EACX;EACA,WAAW;CACZ,EAAE,GAAG,6BAA6B,CAAC;AACpC;AACA,MAAM,iCAAiC;CACtC,GAAG;CACH,cAAc,MAAM,KAAK,8BAA8B,OAAO,CAAC;CAC/D,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,qCAAqC,4BAA4B,MAAM,QAAQ,MAAM,UAAU,CAAC;CACxG;AACD"}
@@ -0,0 +1,3 @@
1
+ import { r as renderLoweredSql } from "./adapter-DEYUC-KO-DO_abhIq.mjs";
2
+ import "./sql-renderer-KX6hn_tg.mjs";
3
+ export { renderLoweredSql };
@@ -0,0 +1,2 @@
1
+ import { s as renderLoweredSql } from "./adapter-BI0XGOVw-Df6PZFmg.mjs";
2
+ export { renderLoweredSql };
@@ -1,3 +1,3 @@
1
- import { i as SqliteLoweredStatement, n as SqliteCodecRegistry, r as SqliteContract, t as SqliteAdapterOptions } from "./types-C5FSREvo-Bm6N5Kog.mjs";
2
- import "./types-DiH2oWUJ.mjs";
1
+ import { i as SqliteLoweredStatement, n as SqliteCodecRegistry, r as SqliteContract, t as SqliteAdapterOptions } from "./types-C5FSREvo-CwUlKK34.mjs";
2
+ import "./types-B7e2QVEx.mjs";
3
3
  export type { SqliteAdapterOptions, SqliteCodecRegistry, SqliteContract, SqliteLoweredStatement };
@@ -0,0 +1,10 @@
1
+ import { SqlAggregateDescriptor } from "@prisma/orm-family-sql/relational-core/aggregate-descriptor-registry";
2
+ //#region ../../../3-targets/3-targets/sqlite/dist/aggregates.d.mts
3
+ //#region src/core/aggregates.d.ts
4
+ /**
5
+ * Every aggregate overload the SQLite target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.
6
+ */
7
+ declare const sqliteAggregateDescriptors: ReadonlyArray<SqlAggregateDescriptor>;
8
+ //#endregion
9
+ export { sqliteAggregateDescriptors as t };
10
+ //# sourceMappingURL=aggregates-BGuKJwfI.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregates-BGuKJwfI.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/aggregates.d.mts"],"mappings":";;;;;;cAKc,4BAA4B,cAAc"}
@@ -0,0 +1,95 @@
1
+ import { a as SQLITE_JSON_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, l as SQL_FLOAT_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_INT_CODEC_ID } from "./codec-ids-xicqpuAa-DHnKqnIs.mjs";
2
+ import { AggregateExpr, CastExpr } from "@prisma/orm-family-sql/relational-core/ast";
3
+ //#region ../../../3-targets/3-targets/sqlite/dist/aggregates.mjs
4
+ const overCodec = (codecId) => ({
5
+ kind: "codec",
6
+ codecId
7
+ });
8
+ const overTrait = (trait) => ({
9
+ kind: "trait",
10
+ trait
11
+ });
12
+ /** An aggregate whose result is one of the input values, so it carries the input's codec. */
13
+ const preservesInput = (operation, input) => ({
14
+ operation,
15
+ input,
16
+ output: { kind: "self" },
17
+ nullable: true
18
+ });
19
+ /**
20
+ * Render the aggregate as text.
21
+ *
22
+ * SQLite computes an aggregate into an INTEGER, and the driver reads an integer
23
+ * no JS number can hold as an error rather than a value — so an aggregate whose
24
+ * result is a bigint leaves the database through this cast, which is the form
25
+ * the bigint codec reads anyway. The hook builds the expression and nothing
26
+ * else: which codec the result carries is the descriptor's `output` to declare,
27
+ * not this function's to choose.
28
+ */
29
+ const castResultToText = (operation) => ({ expr }) => CastExpr.as(new AggregateExpr(operation, expr), "text");
30
+ /** An aggregate whose result is a new value, named by codec and without the input's type parameters. */
31
+ const produces = (operation, input, codecId) => ({
32
+ operation,
33
+ input,
34
+ output: {
35
+ kind: "codec",
36
+ codecId
37
+ },
38
+ nullable: true,
39
+ ...codecId === "sqlite/bigint@1" ? { lower: castResultToText(operation) } : {}
40
+ });
41
+ /** Codecs stored as SQLite integers. Their `sum` is an integer of up to 64 bits, which is `sqlite/bigint@1`'s range and beyond `sqlite/integer@1`'s. */
42
+ const INTEGER_CODECS = [
43
+ SQLITE_INTEGER_CODEC_ID,
44
+ SQLITE_BIGINT_CODEC_ID,
45
+ SQL_INT_CODEC_ID
46
+ ];
47
+ /** Codecs stored as SQLite reals. Their `sum` stays real. */
48
+ const REAL_CODECS = [SQLITE_REAL_CODEC_ID, SQL_FLOAT_CODEC_ID];
49
+ /**
50
+ * Codecs whose `min`/`max` returns the input value and whose traits do not already say so: SQLite compares blobs bytewise and text by its collation, so a datetime, a JSON document, and a blob each have a well-defined least and greatest — unlike the numeric and textual codecs, whose traits carry them.
51
+ */
52
+ const MIN_MAX_PRESERVING_CODECS = [
53
+ SQLITE_DATETIME_CODEC_ID,
54
+ SQLITE_JSON_CODEC_ID,
55
+ SQLITE_BLOB_CODEC_ID
56
+ ];
57
+ const orderingDescriptors = (operation) => [
58
+ preservesInput(operation, overTrait("numeric")),
59
+ preservesInput(operation, overTrait("textual")),
60
+ ...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, overCodec(codecId))),
61
+ {
62
+ operation,
63
+ input: {
64
+ kind: "codec",
65
+ codecId: SQLITE_BIGINT_CODEC_ID
66
+ },
67
+ output: { kind: "self" },
68
+ nullable: true,
69
+ lower: castResultToText(operation)
70
+ }
71
+ ];
72
+ /**
73
+ * Every aggregate overload the SQLite target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.
74
+ */
75
+ const sqliteAggregateDescriptors = [
76
+ {
77
+ operation: "count",
78
+ input: { kind: "any" },
79
+ output: {
80
+ kind: "codec",
81
+ codecId: SQLITE_BIGINT_CODEC_ID
82
+ },
83
+ nullable: false,
84
+ lower: castResultToText("count")
85
+ },
86
+ ...INTEGER_CODECS.map((codecId) => produces("sum", overCodec(codecId), SQLITE_BIGINT_CODEC_ID)),
87
+ ...REAL_CODECS.map((codecId) => produces("sum", overCodec(codecId), SQLITE_REAL_CODEC_ID)),
88
+ ...[...INTEGER_CODECS, ...REAL_CODECS].map((codecId) => produces("avg", overCodec(codecId), SQLITE_REAL_CODEC_ID)),
89
+ ...orderingDescriptors("min"),
90
+ ...orderingDescriptors("max")
91
+ ];
92
+ //#endregion
93
+ export { sqliteAggregateDescriptors as t };
94
+
95
+ //# sourceMappingURL=aggregates-CTDRDyvD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregates-CTDRDyvD.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/aggregates.mjs"],"sourcesContent":["import { a as SQLITE_JSON_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, l as SQL_FLOAT_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_INT_CODEC_ID } from \"./codec-ids-xicqpuAa.mjs\";\nimport { AggregateExpr, CastExpr } from \"@internal/sql-relational-core/ast\";\n//#region src/core/aggregates.ts\nconst overCodec = (codecId) => ({\n\tkind: \"codec\",\n\tcodecId\n});\nconst overTrait = (trait) => ({\n\tkind: \"trait\",\n\ttrait\n});\n/** An aggregate whose result is one of the input values, so it carries the input's codec. */\nconst preservesInput = (operation, input) => ({\n\toperation,\n\tinput,\n\toutput: { kind: \"self\" },\n\tnullable: true\n});\n/**\n* Render the aggregate as text.\n*\n* SQLite computes an aggregate into an INTEGER, and the driver reads an integer\n* no JS number can hold as an error rather than a value — so an aggregate whose\n* result is a bigint leaves the database through this cast, which is the form\n* the bigint codec reads anyway. The hook builds the expression and nothing\n* else: which codec the result carries is the descriptor's `output` to declare,\n* not this function's to choose.\n*/\nconst castResultToText = (operation) => ({ expr }) => CastExpr.as(new AggregateExpr(operation, expr), \"text\");\n/** An aggregate whose result is a new value, named by codec and without the input's type parameters. */\nconst produces = (operation, input, codecId) => ({\n\toperation,\n\tinput,\n\toutput: {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t},\n\tnullable: true,\n\t...codecId === \"sqlite/bigint@1\" ? { lower: castResultToText(operation) } : {}\n});\n/** Codecs stored as SQLite integers. Their `sum` is an integer of up to 64 bits, which is `sqlite/bigint@1`'s range and beyond `sqlite/integer@1`'s. */\nconst INTEGER_CODECS = [\n\tSQLITE_INTEGER_CODEC_ID,\n\tSQLITE_BIGINT_CODEC_ID,\n\tSQL_INT_CODEC_ID\n];\n/** Codecs stored as SQLite reals. Their `sum` stays real. */\nconst REAL_CODECS = [SQLITE_REAL_CODEC_ID, SQL_FLOAT_CODEC_ID];\n/**\n* Codecs whose `min`/`max` returns the input value and whose traits do not already say so: SQLite compares blobs bytewise and text by its collation, so a datetime, a JSON document, and a blob each have a well-defined least and greatest — unlike the numeric and textual codecs, whose traits carry them.\n*/\nconst MIN_MAX_PRESERVING_CODECS = [\n\tSQLITE_DATETIME_CODEC_ID,\n\tSQLITE_JSON_CODEC_ID,\n\tSQLITE_BLOB_CODEC_ID\n];\nconst orderingDescriptors = (operation) => [\n\tpreservesInput(operation, overTrait(\"numeric\")),\n\tpreservesInput(operation, overTrait(\"textual\")),\n\t...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, overCodec(codecId))),\n\t{\n\t\toperation,\n\t\tinput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID\n\t\t},\n\t\toutput: { kind: \"self\" },\n\t\tnullable: true,\n\t\tlower: castResultToText(operation)\n\t}\n];\n/**\n* Every aggregate overload the SQLite target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.\n*/\nconst sqliteAggregateDescriptors = [\n\t{\n\t\toperation: \"count\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\tlower: castResultToText(\"count\")\n\t},\n\t...INTEGER_CODECS.map((codecId) => produces(\"sum\", overCodec(codecId), SQLITE_BIGINT_CODEC_ID)),\n\t...REAL_CODECS.map((codecId) => produces(\"sum\", overCodec(codecId), SQLITE_REAL_CODEC_ID)),\n\t...[...INTEGER_CODECS, ...REAL_CODECS].map((codecId) => produces(\"avg\", overCodec(codecId), SQLITE_REAL_CODEC_ID)),\n\t...orderingDescriptors(\"min\"),\n\t...orderingDescriptors(\"max\")\n];\n//#endregion\nexport { sqliteAggregateDescriptors };\n\n//# sourceMappingURL=aggregates.mjs.map"],"mappings":";;;AAGA,MAAM,aAAa,aAAa;CAC/B,MAAM;CACN;AACD;AACA,MAAM,aAAa,WAAW;CAC7B,MAAM;CACN;AACD;;AAEA,MAAM,kBAAkB,WAAW,WAAW;CAC7C;CACA;CACA,QAAQ,EAAE,MAAM,OAAO;CACvB,UAAU;AACX;;;;;;;;;;;AAWA,MAAM,oBAAoB,eAAe,EAAE,WAAW,SAAS,GAAG,IAAI,cAAc,WAAW,IAAI,GAAG,MAAM;;AAE5G,MAAM,YAAY,WAAW,OAAO,aAAa;CAChD;CACA;CACA,QAAQ;EACP,MAAM;EACN;CACD;CACA,UAAU;CACV,GAAG,YAAY,oBAAoB,EAAE,OAAO,iBAAiB,SAAS,EAAE,IAAI,CAAC;AAC9E;;AAEA,MAAM,iBAAiB;CACtB;CACA;CACA;AACD;;AAEA,MAAM,cAAc,CAAC,sBAAsB,kBAAkB;;;;AAI7D,MAAM,4BAA4B;CACjC;CACA;CACA;AACD;AACA,MAAM,uBAAuB,cAAc;CAC1C,eAAe,WAAW,UAAU,SAAS,CAAC;CAC9C,eAAe,WAAW,UAAU,SAAS,CAAC;CAC9C,GAAG,0BAA0B,KAAK,YAAY,eAAe,WAAW,UAAU,OAAO,CAAC,CAAC;CAC3F;EACC;EACA,OAAO;GACN,MAAM;GACN,SAAS;EACV;EACA,QAAQ,EAAE,MAAM,OAAO;EACvB,UAAU;EACV,OAAO,iBAAiB,SAAS;CAClC;AACD;;;;AAIA,MAAM,6BAA6B;CAClC;EACC,WAAW;EACX,OAAO,EAAE,MAAM,MAAM;EACrB,QAAQ;GACP,MAAM;GACN,SAAS;EACV;EACA,UAAU;EACV,OAAO,iBAAiB,OAAO;CAChC;CACA,GAAG,eAAe,KAAK,YAAY,SAAS,OAAO,UAAU,OAAO,GAAG,sBAAsB,CAAC;CAC9F,GAAG,YAAY,KAAK,YAAY,SAAS,OAAO,UAAU,OAAO,GAAG,oBAAoB,CAAC;CACzF,GAAG,CAAC,GAAG,gBAAgB,GAAG,WAAW,CAAC,CAAC,KAAK,YAAY,SAAS,OAAO,UAAU,OAAO,GAAG,oBAAoB,CAAC;CACjH,GAAG,oBAAoB,KAAK;CAC5B,GAAG,oBAAoB,KAAK;AAC7B"}
@@ -1,5 +1,5 @@
1
- import { AnyCodecDescriptor, CodecDescriptor, CodecDescriptorImpl, CodecRef } from "@prisma/orm-framework/components/codec";
2
1
  import { ProjectionExpr } from "@prisma/orm-family-sql/relational-core/ast";
2
+ import { AnyCodecDescriptor, CodecDescriptor, CodecDescriptorImpl, CodecRef } from "@prisma/orm-framework/components/codec";
3
3
  //#region ../../../3-targets/3-targets/sqlite/dist/codec-descriptor-BcgD9f3L.d.mts
4
4
  //#region src/core/codec-descriptor.d.ts
5
5
  declare const SQLITE_CODEC_DESCRIPTOR_KIND: "sqlite-codec";
@@ -28,4 +28,4 @@ interface SqliteCodecDescriptorRegistry {
28
28
  declare function buildSqliteCodecDescriptorRegistry(descriptors: ReadonlyArray<unknown>): SqliteCodecDescriptorRegistry;
29
29
  //#endregion
30
30
  export { SqliteCodecOptions as a, isSqliteCodecDescriptor as c, SqliteCodecDescriptorRegistry as i, sqliteCodec as l, AnySqliteCodecDescriptor as n, buildSqliteCodecDescriptorRegistry as o, SqliteCodecDescriptor as r, defineSqliteCodecs as s, AdaptedSqliteCodecDescriptor as t };
31
- //# sourceMappingURL=codec-descriptor-BcgD9f3L-BjEkn9Ob.d.mts.map
31
+ //# sourceMappingURL=codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codec-descriptor-BcgD9f3L-BjEkn9Ob.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-descriptor-BcgD9f3L.d.mts"],"mappings":";;;;cAGc;UACJ,iCAAiC;WAChC,uBAAuB;EAChC,YAAY,YAAY,gBAAgB,KAAK,WAAW;;uBAEnC,sBAAsB,kBAAkB,oBAAoB,cAAc;WACtF;qBACU,eAAe,YAAY,gBAAgB,QAAQ,IAAI;EAC1E,YAAY,YAAY,gBAAgB,KAAK,WAAW;UAChD;;KAEL,iBAAiB,UAAU,sBAAsB,UAAU,sBAAsB,KAAK;UACjF,mBAAmB;WAClB,iBAAiB,YAAY,gBAAgB,QAAQ,MAAM;;KAEjE,6BAA6B,UAAU,sBAAsB,KAAK,SAAS,gBAAgB,iBAAiB,OAAO,KAAK;iBAC5G,YAAY,UAAU,oBAAoB,YAAY,GAAG,SAAS,mBAAmB,iBAAiB,MAAM,6BAA6B;iBACzI,yBAAyB,6BAA6B,4BAA4B,aAAa,cAAc;iBAC7G,wBAAwB,iBAAiB,SAAS;UACzD;EACR,cAAc,kBAAkB;EAChC,UAAU,iBAAiB;;iBAEZ,mCAAmC,aAAa,yBAAyB"}
1
+ {"version":3,"file":"codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-descriptor-BcgD9f3L.d.mts"],"mappings":";;;;cAGc;UACJ,iCAAiC;WAChC,uBAAuB;EAChC,YAAY,YAAY,gBAAgB,KAAK,WAAW;;uBAEnC,sBAAsB,kBAAkB,oBAAoB,cAAc;WACtF;qBACU,eAAe,YAAY,gBAAgB,QAAQ,IAAI;EAC1E,YAAY,YAAY,gBAAgB,KAAK,WAAW;UAChD;;KAEL,iBAAiB,UAAU,sBAAsB,UAAU,sBAAsB,KAAK;UACjF,mBAAmB;WAClB,iBAAiB,YAAY,gBAAgB,QAAQ,MAAM;;KAEjE,6BAA6B,UAAU,sBAAsB,KAAK,SAAS,gBAAgB,iBAAiB,OAAO,KAAK;iBAC5G,YAAY,UAAU,oBAAoB,YAAY,GAAG,SAAS,mBAAmB,iBAAiB,MAAM,6BAA6B;iBACzI,yBAAyB,6BAA6B,4BAA4B,aAAa,cAAc;iBAC7G,wBAAwB,iBAAiB,SAAS;UACzD;EACR,cAAc,kBAAkB;EAChC,UAAU,iBAAiB;;iBAEZ,mCAAmC,aAAa,yBAAyB"}
@@ -0,0 +1 @@
1
+ import "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
@@ -0,0 +1,2 @@
1
+ import "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
2
+ import "./codec-descriptor-rFuZ9DzY-CKRIRxah.mjs";
@@ -0,0 +1,2 @@
1
+ import "./codecs-CEh66QoN-oCsdncEe.mjs";
2
+ import "./codec-types-DOyikA9Q-DVHiIZxI.mjs";
@@ -0,0 +1 @@
1
+ import "./codec-types-BV3IjK44.mjs";
@@ -1,8 +1,8 @@
1
- import { t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
2
- import "./codec-descriptor-rFuZ9DzY-DO0k8l6N.mjs";
3
- import { a as SqliteIntegerDescriptor, c as SqliteTextDescriptor, i as SqliteDatetimeDescriptor, n as SqliteBigintDescriptor, o as SqliteJsonDescriptor, r as SqliteBlobDescriptor, s as SqliteRealDescriptor } from "./codecs-1-oOsTPG-Bv518Lbm.mjs";
1
+ import { t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
2
+ import "./codec-descriptor-rFuZ9DzY-CKRIRxah.mjs";
3
+ import { a as SqliteIntegerDescriptor, c as SqliteTextDescriptor, i as SqliteDatetimeDescriptor, n as SqliteBigintDescriptor, o as SqliteJsonDescriptor, r as SqliteBlobDescriptor, s as SqliteRealDescriptor } from "./codecs-CEh66QoN-oCsdncEe.mjs";
4
4
  import { ExtractCodecTypes } from "@prisma/orm-family-sql/relational-core/ast";
5
- //#region ../../../3-targets/3-targets/sqlite/dist/codec-types-DKB--ltR.d.mts
5
+ //#region ../../../3-targets/3-targets/sqlite/dist/codec-types-DOyikA9Q.d.mts
6
6
  //#region src/exports/codec-types.d.ts
7
7
  declare const codecDescriptorMap: {
8
8
  readonly char: AdaptedSqliteCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlCharDescriptor>;
@@ -21,4 +21,4 @@ type Resolve<T> = { readonly [K in keyof T]: { readonly [P in keyof T[K]]: T[K][
21
21
  type CodecTypes = Resolve<ExtractCodecTypes<typeof codecDescriptorMap>>;
22
22
  //#endregion
23
23
  export { CodecTypes as t };
24
- //# sourceMappingURL=codec-types-DKB--ltR-CIuvX0zx.d.mts.map
24
+ //# sourceMappingURL=codec-types-DOyikA9Q-DVHiIZxI.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codec-types-DKB--ltR-CIuvX0zx.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-types-DKB--ltR.d.mts"],"mappings":";;;;;;cAKc;WACH,MAAM,yEAAyE;WAC/E,SAAS,yEAAyE;WAClF,KAAK,yEAAyE;WAC9E,OAAO,yEAAyE;WAChF,MAAM;WACN,SAAS;WACT,MAAM;WACN,MAAM;WACN,UAAU;WACV,MAAM;WACN,QAAQ;;KAEd,QAAQ,iBAAiB,WAAW,gBAAgB,WAAW,EAAE,KAAK,EAAE,GAAG;KAC3E,aAAa,QAAQ,yBAAyB"}
1
+ {"version":3,"file":"codec-types-DOyikA9Q-DVHiIZxI.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-types-DOyikA9Q.d.mts"],"mappings":";;;;;;cAKc;WACH,MAAM,yEAAyE;WAC/E,SAAS,yEAAyE;WAClF,KAAK,yEAAyE;WAC9E,OAAO,yEAAyE;WAChF,MAAM;WACN,SAAS;WACT,MAAM;WACN,MAAM;WACN,UAAU;WACV,MAAM;WACN,QAAQ;;KAEd,QAAQ,iBAAiB,WAAW,gBAAgB,WAAW,EAAE,KAAK,EAAE,GAAG;KAC3E,aAAa,QAAQ,yBAAyB"}
@@ -0,0 +1 @@
1
+ import "./codecs-CEh66QoN-oCsdncEe.mjs";
@@ -1,8 +1,8 @@
1
- import { a as sqliteCodec, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-kVCSW1OR-CPatZUPM.mjs";
2
1
  import { a as SQLITE_JSON_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, s as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-xicqpuAa-DHnKqnIs.mjs";
2
+ import { a as sqliteCodec, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-kVCSW1OR-CPatZUPM.mjs";
3
3
  import { n as sqliteError } from "./errors-CKsaaSnD-BeB4JS8h.mjs";
4
- import { CodecImpl, column, voidParamsSchema } from "@prisma/orm-framework/components/codec";
5
4
  import { CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlVarcharDescriptor } from "@prisma/orm-family-sql/relational-core/ast";
5
+ import { CodecImpl, column, voidParamsSchema } from "@prisma/orm-framework/components/codec";
6
6
  import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
7
7
  //#region ../../../3-targets/3-targets/sqlite/dist/codecs.mjs
8
8
  /**
@@ -287,7 +287,17 @@ var SqliteBigintCodec = class extends CodecImpl {
287
287
  async encode(value, _ctx) {
288
288
  return value;
289
289
  }
290
+ /**
291
+ * The wire value is text wherever the value could outrun a JS number: an
292
+ * aggregate SQLite computes leaves the database through the descriptor's cast
293
+ * to text, because the driver reads an integer no number can hold as an error
294
+ * rather than a value.
295
+ */
290
296
  async decode(wire, _ctx) {
297
+ if (typeof wire === "string" && !DECIMAL_INTEGER.test(wire)) throw sqliteError("RUNTIME.DECODE_FAILED", "sqlite/bigint@1 wire value must be a decimal string", { meta: {
298
+ codecId: SQLITE_BIGINT_CODEC_ID,
299
+ received: wire
300
+ } });
291
301
  return BigInt(wire);
292
302
  }
293
303
  encodeJson(value) {
@@ -342,4 +352,4 @@ const sqliteCodecDescriptorRegistry = buildSqliteCodecDescriptorRegistry(codecDe
342
352
  //#endregion
343
353
  export { sqliteCodecRegistry as a, sqliteJsonColumn as c, sqliteCodecDescriptorRegistry as i, sqliteRealColumn as l, sqliteBigintColumn as n, sqliteDatetimeColumn as o, sqliteBlobColumn as r, sqliteIntegerColumn as s, jsonDocumentRetag as t, sqliteTextColumn as u };
344
354
 
345
- //# sourceMappingURL=codecs-CM_2W3uA.mjs.map
355
+ //# sourceMappingURL=codecs-BaoqGdxT.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"codecs-CM_2W3uA.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs.mjs"],"sourcesContent":["import { a as SQLITE_JSON_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, s as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-xicqpuAa.mjs\";\nimport { a as sqliteCodec, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from \"./codec-descriptor-kVCSW1OR.mjs\";\nimport { n as sqliteError } from \"./errors-CKsaaSnD.mjs\";\nimport { CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { CodecImpl, column, voidParamsSchema } from \"@internal/framework-components/codec\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\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-valued expression as decimal text.\n*\n* The cast is part of the projected expression, so it applies before the JSON\n* constructor sees the value: handed an INTEGER directly, the constructor emits\n* a JSON number, and SQLite's 64-bit range does not survive being read back as\n* a double. Casting the constructor's result would be too late.\n*/\nconst decimalTextJsonProjection = (expression) => CastExpr.as(expression, \"TEXT\");\n/**\n* Projects a BLOB as hexadecimal text.\n*\n* SQLite's JSON functions reject a BLOB argument outright, so the encoding has\n* to replace the native conversion rather than post-process it. `hex()` emits\n* uppercase and never wraps at any length, which is the spelling `encodeJson`\n* pins.\n*\n* `hex(NULL)` is `''` rather than NULL, and `''` is the hex of an empty blob —\n* so without the NULL check an absent blob and an empty one would both project\n* as `''`, and `decodeJson` accepts `''` because zero hex pairs is a valid\n* empty blob. The check keeps the two distinguishable.\n*/\nconst hexJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: NullCheckExpr.isNull(expression),\n\tvalue: LiteralExpr.of(null)\n}], FunctionCallExpr.of(\"hex\", [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+$/;\nconst UPPERCASE_HEX = /^(?:[0-9A-F]{2})*$/;\n/**\n* JSON has no spelling for an infinity or a NaN, and SQLite renders one as\n* `9.0e+999`, which reads back as `Infinity` rather than failing. A real is\n* therefore carried only where it is finite.\n*/\nconst finiteReal = (value, code) => {\n\tif (!Number.isFinite(value)) throw sqliteError(code, \"sqlite/real@1 value must be a finite number\", { meta: {\n\t\tcodecId: SQLITE_REAL_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n\treturn value;\n};\nconst sqliteSqlCharDescriptor = sqliteCodec(sqlCharDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlVarcharDescriptor = sqliteCodec(sqlVarcharDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlIntDescriptor = sqliteCodec(sqlIntDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlFloatDescriptor = sqliteCodec(sqlFloatDescriptor, { jsonProjection: identityJsonProjection });\nvar SqliteTextCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteTextDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteTextCodec(this);\n\t}\n};\nconst sqliteTextDescriptor = new SqliteTextDescriptor();\nconst sqliteTextColumn = () => column(sqliteTextDescriptor.factory(), sqliteTextDescriptor.codecId, void 0, \"text\");\nvar SqliteIntegerCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteIntegerDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_INTEGER_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"integer\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteIntegerCodec(this);\n\t}\n};\nconst sqliteIntegerDescriptor = new SqliteIntegerDescriptor();\nconst sqliteIntegerColumn = () => column(sqliteIntegerDescriptor.factory(), sqliteIntegerDescriptor.codecId, void 0, \"integer\");\nvar SqliteRealCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn finiteReal(value, \"RUNTIME.ENCODE_FAILED\");\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"number\") throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/real@1 database JSON value must be a number\", { meta: {\n\t\t\tcodecId: SQLITE_REAL_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn finiteReal(json, \"RUNTIME.DECODE_FAILED\");\n\t}\n};\nvar SqliteRealDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_REAL_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"real\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteRealCodec(this);\n\t}\n};\nconst sqliteRealDescriptor = new SqliteRealDescriptor();\nconst sqliteRealColumn = () => column(sqliteRealDescriptor.factory(), sqliteRealDescriptor.codecId, void 0, \"real\");\nvar SqliteBlobCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn Buffer.from(value).toString(\"hex\").toUpperCase();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\" || !UPPERCASE_HEX.test(json)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/blob@1 database JSON value must be uppercase hexadecimal text\", { meta: {\n\t\t\tcodecId: SQLITE_BLOB_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn new Uint8Array(Buffer.from(json, \"hex\"));\n\t}\n};\nvar SqliteBlobDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tcodecId = SQLITE_BLOB_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"blob\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteBlobCodec(this);\n\t}\n};\nconst sqliteBlobDescriptor = new SqliteBlobDescriptor();\nconst sqliteBlobColumn = () => column(sqliteBlobDescriptor.factory(), sqliteBlobDescriptor.codecId, void 0, \"blob\");\nvar SqliteDatetimeCodec = class extends CodecImpl {\n\tparseDate(value) {\n\t\tconst date = new Date(value);\n\t\tif (Number.isNaN(date.getTime())) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `sqlite/datetime@1 value must be a valid ISO-8601 string: ${value}`, { meta: {\n\t\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\t\treceived: value\n\t\t} });\n\t\treturn date;\n\t}\n\tasync encode(value, _ctx) {\n\t\treturn value.toISOString();\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn this.parseDate(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value.toISOString();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\") throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/datetime@1 contract value must be an ISO-8601 string\", { meta: {\n\t\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn this.parseDate(json);\n\t}\n};\nvar SqliteDatetimeDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_DATETIME_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteDatetimeCodec(this);\n\t}\n};\nconst sqliteDatetimeDescriptor = new SqliteDatetimeDescriptor();\nconst sqliteDatetimeColumn = () => column(sqliteDatetimeDescriptor.factory(), sqliteDatetimeDescriptor.codecId, void 0, \"text\");\nvar SqliteJsonCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn JSON.stringify(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn typeof wire === \"string\" ? JSON.parse(wire) : wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteJsonDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn jsonDocumentRetag(expression);\n\t}\n\tcodecId = SQLITE_JSON_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteJsonCodec(this);\n\t}\n};\nconst sqliteJsonDescriptor = new SqliteJsonDescriptor();\nconst sqliteJsonColumn = () => column(sqliteJsonDescriptor.factory(), sqliteJsonDescriptor.codecId, void 0, \"text\");\nvar SqliteBigintCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn BigInt(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value.toString();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\" || !DECIMAL_INTEGER.test(json)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigint@1 database JSON value must be a decimal string\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn BigInt(json);\n\t}\n};\nvar SqliteBigintDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tcodecId = SQLITE_BIGINT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"integer\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteBigintCodec(this);\n\t}\n};\nconst sqliteBigintDescriptor = new SqliteBigintDescriptor();\nconst sqliteBigintColumn = () => column(sqliteBigintDescriptor.factory(), sqliteBigintDescriptor.codecId, void 0, \"integer\");\nconst codecDescriptors = defineSqliteCodecs([\n\tsqliteSqlCharDescriptor,\n\tsqliteSqlVarcharDescriptor,\n\tsqliteSqlIntDescriptor,\n\tsqliteSqlFloatDescriptor,\n\tsqliteTextDescriptor,\n\tsqliteIntegerDescriptor,\n\tsqliteRealDescriptor,\n\tsqliteBlobDescriptor,\n\tsqliteDatetimeDescriptor,\n\tsqliteJsonDescriptor,\n\tsqliteBigintDescriptor\n]);\n//#endregion\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\nexport { jsonDocumentRetag, sqliteBigintColumn, sqliteBlobColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };\n\n//# sourceMappingURL=codecs.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,0BAA0B,eAAe;;;;;;;;;AAS/C,MAAM,6BAA6B,eAAe,SAAS,GAAG,YAAY,MAAM;;;;;;;;;;;;;;AAchF,MAAM,qBAAqB,eAAe,SAAS,GAAG,CAAC;CACtD,WAAW,cAAc,OAAO,UAAU;CAC1C,OAAO,YAAY,GAAG,IAAI;AA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AW,MAAM;EAChB,IAAI,OAAO,SAAS,YAAY,CAAC,gBAAgB,KAAK,IAAI,GAAG,MAAM,YAAY,yBAAyB,gEAAgE,EAAE,MAAM;GAC/K,SAAS;GACT,UAAU,OAAO;EAClB,EAAE,CAAC;EACH,OAAO,OAAO,IAAI;CACnB;AACD;AACA,IAAI,yBAAyB,cAAc,sBAAsB;CAChE,eAAe,YAAY;EAC1B,OAAO,0BAA0B,UAAU;CAC5C;CACA,UAAU;CACV,SAAS;EACR;EACA;EACA;CACD;CACA,cAAc,CAAC,SAAS;CACxB,eAAe;CACf,UAAU;EACT,aAAa,IAAI,kBAAkB,IAAI;CACxC;AACD;AACA,MAAM,yBAAyB,IAAI,uBAAuB;AAC1D,MAAM,2BAA2B,OAAO,uBAAuB,QAAQ,GAAG,uBAAuB,SAAS,KAAK,GAAG,SAAS;AAC3H,MAAM,mBAAmB,mBAAmB;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;;;;;AAQD,MAAM,sBAAsB,6BAA6B,gBAAgB;AACzE,MAAM,gCAAgC,mCAAmC,gBAAgB"}
1
+ {"version":3,"file":"codecs-BaoqGdxT.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs.mjs"],"sourcesContent":["import { a as SQLITE_JSON_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, s as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-xicqpuAa.mjs\";\nimport { a as sqliteCodec, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from \"./codec-descriptor-kVCSW1OR.mjs\";\nimport { n as sqliteError } from \"./errors-CKsaaSnD.mjs\";\nimport { CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { CodecImpl, column, voidParamsSchema } from \"@internal/framework-components/codec\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\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-valued expression as decimal text.\n*\n* The cast is part of the projected expression, so it applies before the JSON\n* constructor sees the value: handed an INTEGER directly, the constructor emits\n* a JSON number, and SQLite's 64-bit range does not survive being read back as\n* a double. Casting the constructor's result would be too late.\n*/\nconst decimalTextJsonProjection = (expression) => CastExpr.as(expression, \"TEXT\");\n/**\n* Projects a BLOB as hexadecimal text.\n*\n* SQLite's JSON functions reject a BLOB argument outright, so the encoding has\n* to replace the native conversion rather than post-process it. `hex()` emits\n* uppercase and never wraps at any length, which is the spelling `encodeJson`\n* pins.\n*\n* `hex(NULL)` is `''` rather than NULL, and `''` is the hex of an empty blob —\n* so without the NULL check an absent blob and an empty one would both project\n* as `''`, and `decodeJson` accepts `''` because zero hex pairs is a valid\n* empty blob. The check keeps the two distinguishable.\n*/\nconst hexJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: NullCheckExpr.isNull(expression),\n\tvalue: LiteralExpr.of(null)\n}], FunctionCallExpr.of(\"hex\", [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+$/;\nconst UPPERCASE_HEX = /^(?:[0-9A-F]{2})*$/;\n/**\n* JSON has no spelling for an infinity or a NaN, and SQLite renders one as\n* `9.0e+999`, which reads back as `Infinity` rather than failing. A real is\n* therefore carried only where it is finite.\n*/\nconst finiteReal = (value, code) => {\n\tif (!Number.isFinite(value)) throw sqliteError(code, \"sqlite/real@1 value must be a finite number\", { meta: {\n\t\tcodecId: SQLITE_REAL_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n\treturn value;\n};\nconst sqliteSqlCharDescriptor = sqliteCodec(sqlCharDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlVarcharDescriptor = sqliteCodec(sqlVarcharDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlIntDescriptor = sqliteCodec(sqlIntDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlFloatDescriptor = sqliteCodec(sqlFloatDescriptor, { jsonProjection: identityJsonProjection });\nvar SqliteTextCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteTextDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteTextCodec(this);\n\t}\n};\nconst sqliteTextDescriptor = new SqliteTextDescriptor();\nconst sqliteTextColumn = () => column(sqliteTextDescriptor.factory(), sqliteTextDescriptor.codecId, void 0, \"text\");\nvar SqliteIntegerCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteIntegerDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_INTEGER_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"integer\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteIntegerCodec(this);\n\t}\n};\nconst sqliteIntegerDescriptor = new SqliteIntegerDescriptor();\nconst sqliteIntegerColumn = () => column(sqliteIntegerDescriptor.factory(), sqliteIntegerDescriptor.codecId, void 0, \"integer\");\nvar SqliteRealCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn finiteReal(value, \"RUNTIME.ENCODE_FAILED\");\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"number\") throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/real@1 database JSON value must be a number\", { meta: {\n\t\t\tcodecId: SQLITE_REAL_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn finiteReal(json, \"RUNTIME.DECODE_FAILED\");\n\t}\n};\nvar SqliteRealDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_REAL_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"real\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteRealCodec(this);\n\t}\n};\nconst sqliteRealDescriptor = new SqliteRealDescriptor();\nconst sqliteRealColumn = () => column(sqliteRealDescriptor.factory(), sqliteRealDescriptor.codecId, void 0, \"real\");\nvar SqliteBlobCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn Buffer.from(value).toString(\"hex\").toUpperCase();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\" || !UPPERCASE_HEX.test(json)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/blob@1 database JSON value must be uppercase hexadecimal text\", { meta: {\n\t\t\tcodecId: SQLITE_BLOB_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn new Uint8Array(Buffer.from(json, \"hex\"));\n\t}\n};\nvar SqliteBlobDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tcodecId = SQLITE_BLOB_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"blob\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteBlobCodec(this);\n\t}\n};\nconst sqliteBlobDescriptor = new SqliteBlobDescriptor();\nconst sqliteBlobColumn = () => column(sqliteBlobDescriptor.factory(), sqliteBlobDescriptor.codecId, void 0, \"blob\");\nvar SqliteDatetimeCodec = class extends CodecImpl {\n\tparseDate(value) {\n\t\tconst date = new Date(value);\n\t\tif (Number.isNaN(date.getTime())) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `sqlite/datetime@1 value must be a valid ISO-8601 string: ${value}`, { meta: {\n\t\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\t\treceived: value\n\t\t} });\n\t\treturn date;\n\t}\n\tasync encode(value, _ctx) {\n\t\treturn value.toISOString();\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn this.parseDate(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value.toISOString();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\") throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/datetime@1 contract value must be an ISO-8601 string\", { meta: {\n\t\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn this.parseDate(json);\n\t}\n};\nvar SqliteDatetimeDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_DATETIME_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteDatetimeCodec(this);\n\t}\n};\nconst sqliteDatetimeDescriptor = new SqliteDatetimeDescriptor();\nconst sqliteDatetimeColumn = () => column(sqliteDatetimeDescriptor.factory(), sqliteDatetimeDescriptor.codecId, void 0, \"text\");\nvar SqliteJsonCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn JSON.stringify(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn typeof wire === \"string\" ? JSON.parse(wire) : wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteJsonDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn jsonDocumentRetag(expression);\n\t}\n\tcodecId = SQLITE_JSON_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteJsonCodec(this);\n\t}\n};\nconst sqliteJsonDescriptor = new SqliteJsonDescriptor();\nconst sqliteJsonColumn = () => column(sqliteJsonDescriptor.factory(), sqliteJsonDescriptor.codecId, void 0, \"text\");\nvar SqliteBigintCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\t/**\n\t* The wire value is text wherever the value could outrun a JS number: an\n\t* aggregate SQLite computes leaves the database through the descriptor's cast\n\t* to text, because the driver reads an integer no number can hold as an error\n\t* rather than a value.\n\t*/\n\tasync decode(wire, _ctx) {\n\t\tif (typeof wire === \"string\" && !DECIMAL_INTEGER.test(wire)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigint@1 wire value must be a decimal string\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\treceived: wire\n\t\t} });\n\t\treturn BigInt(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value.toString();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\" || !DECIMAL_INTEGER.test(json)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigint@1 database JSON value must be a decimal string\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn BigInt(json);\n\t}\n};\nvar SqliteBigintDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tcodecId = SQLITE_BIGINT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"integer\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteBigintCodec(this);\n\t}\n};\nconst sqliteBigintDescriptor = new SqliteBigintDescriptor();\nconst sqliteBigintColumn = () => column(sqliteBigintDescriptor.factory(), sqliteBigintDescriptor.codecId, void 0, \"integer\");\nconst codecDescriptors = defineSqliteCodecs([\n\tsqliteSqlCharDescriptor,\n\tsqliteSqlVarcharDescriptor,\n\tsqliteSqlIntDescriptor,\n\tsqliteSqlFloatDescriptor,\n\tsqliteTextDescriptor,\n\tsqliteIntegerDescriptor,\n\tsqliteRealDescriptor,\n\tsqliteBlobDescriptor,\n\tsqliteDatetimeDescriptor,\n\tsqliteJsonDescriptor,\n\tsqliteBigintDescriptor\n]);\n//#endregion\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\nexport { jsonDocumentRetag, sqliteBigintColumn, sqliteBlobColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };\n\n//# sourceMappingURL=codecs.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,0BAA0B,eAAe;;;;;;;;;AAS/C,MAAM,6BAA6B,eAAe,SAAS,GAAG,YAAY,MAAM;;;;;;;;;;;;;;AAchF,MAAM,qBAAqB,eAAe,SAAS,GAAG,CAAC;CACtD,WAAW,cAAc,OAAO,UAAU;CAC1C,OAAO,YAAY,GAAG,IAAI;AAC3B,CAAC,GAAG,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC5C,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;AAqBtB,MAAM,qBA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MAAM,SAAS;CACvB;CACA,WAAW,MAAM;EAChB,IAAI,OAAO,SAAS,YAAY,CAAC,gBAAgB,KAAK,IAAI,GAAG,MAAM,YAAY,yBAAyB,gEAAgE,EAAE,MAAM;GAC/K,SAAS;GACT,UAAU,OAAO;EAClB,EAAE,CAAC;EACH,OAAO,OAAO,IAAI;CACnB;AACD;AACA,IAAI,yBAAyB,cAAc,sBAAsB;CAChE,eAAe,YAAY;EAC1B,OAAO,0BAA0B,UAAU;CAC5C;CACA,UAAU;CACV,SAAS;EACR;EACA;EACA;CACD;CACA,cAAc,CAAC,SAAS;CACxB,eAAe;CACf,UAAU;EACT,aAAa,IAAI,kBAAkB,IAAI;CACxC;AACD;AACA,MAAM,yBAAyB,IAAI,uBAAuB;AAC1D,MAAM,2BAA2B,OAAO,uBAAuB,QAAQ,GAAG,uBAAuB,SAAS,KAAK,GAAG,SAAS;AAC3H,MAAM,mBAAmB,mBAAmB;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;;;;;AAQD,MAAM,sBAAsB,6BAA6B,gBAAgB;AACzE,MAAM,gCAAgC,mCAAmC,gBAAgB"}
@@ -1,10 +1,10 @@
1
- import { i as SqliteCodecDescriptorRegistry, r as SqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
1
+ import { i as SqliteCodecDescriptorRegistry, r as SqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
2
2
  import { a as SQLITE_JSON_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, s as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-DocGjhs--CHhP1jNZ.mjs";
3
- import { CodecCallContext, CodecImpl, CodecInstanceContext } from "@prisma/orm-framework/components/codec";
4
3
  import { ProjectionExpr } from "@prisma/orm-family-sql/relational-core/ast";
4
+ import { CodecCallContext, CodecImpl, CodecInstanceContext } from "@prisma/orm-framework/components/codec";
5
5
  import { JsonValue } from "@prisma/orm-framework/contract/types";
6
6
  import { CodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/query-lane-context";
7
- //#region ../../../3-targets/3-targets/sqlite/dist/codecs-1-oOsTPG.d.mts
7
+ //#region ../../../3-targets/3-targets/sqlite/dist/codecs-CEh66QoN.d.mts
8
8
  //#region src/core/codec-helpers.d.ts
9
9
  /**
10
10
  * Local `JsonValue` alias for the SQLite target. Codec implementations live in `codecs.ts` (TML-2357); this module retains only the JSON-shape alias the surrounding adapter and tests still import.
@@ -126,9 +126,15 @@ declare class SqliteJsonDescriptor extends SqliteCodecDescriptor<void> {
126
126
  factory(): (ctx: CodecInstanceContext) => SqliteJsonCodec;
127
127
  }
128
128
  declare const sqliteJsonColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqliteJsonCodec, undefined>;
129
- declare class SqliteBigintCodec extends CodecImpl<typeof SQLITE_BIGINT_CODEC_ID, readonly ['equality', 'order', 'numeric'], number | bigint, bigint> {
129
+ declare class SqliteBigintCodec extends CodecImpl<typeof SQLITE_BIGINT_CODEC_ID, readonly ['equality', 'order', 'numeric'], number | bigint | string, bigint> {
130
130
  encode(value: bigint, _ctx: CodecCallContext): Promise<number | bigint>;
131
- decode(wire: number | bigint, _ctx: CodecCallContext): Promise<bigint>;
131
+ /**
132
+ * The wire value is text wherever the value could outrun a JS number: an
133
+ * aggregate SQLite computes leaves the database through the descriptor's cast
134
+ * to text, because the driver reads an integer no number can hold as an error
135
+ * rather than a value.
136
+ */
137
+ decode(wire: number | bigint | string, _ctx: CodecCallContext): Promise<bigint>;
132
138
  encodeJson(value: bigint): JsonValue;
133
139
  decodeJson(json: JsonValue): bigint;
134
140
  }
@@ -152,4 +158,4 @@ declare const sqliteCodecRegistry: CodecDescriptorRegistry;
152
158
  declare const sqliteCodecDescriptorRegistry: SqliteCodecDescriptorRegistry;
153
159
  //#endregion
154
160
  export { sqliteRealColumn as _, SqliteIntegerDescriptor as a, SqliteTextDescriptor as c, sqliteBlobColumn as d, sqliteCodecDescriptorRegistry as f, sqliteJsonColumn as g, sqliteIntegerColumn as h, SqliteDatetimeDescriptor as i, jsonDocumentRetag as l, sqliteDatetimeColumn as m, SqliteBigintDescriptor as n, SqliteJsonDescriptor as o, sqliteCodecRegistry as p, SqliteBlobDescriptor as r, SqliteRealDescriptor as s, JsonValue$1 as t, sqliteBigintColumn as u, sqliteTextColumn as v };
155
- //# sourceMappingURL=codecs-1-oOsTPG-Bv518Lbm.d.mts.map
161
+ //# sourceMappingURL=codecs-CEh66QoN-oCsdncEe.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codecs-1-oOsTPG-Bv518Lbm.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs-1-oOsTPG.d.mts"],"mappings":";;;;;;;;;;;KAUK;YACO,cAAc;aACb;;;;;;;;;;;;;;;;;;;;;;;cAuBC,oBAAoB,YAAY,mBAAmB;cACnD,wBAAwB,iBAAiB;EACrD,OAAO,eAAe,MAAM,mBAAmB;EAC/C,OAAO,cAAc,MAAM,mBAAmB;EAC9C,WAAW,gBAAgB;EAC3B,WAAW,MAAM;;cAEL,6BAA6B;YAC/B,eAAe,YAAY,iBAAiB;WAC7C;WACA;WACA;WACA,8CAA8C;EACvD,YAAY,KAAK,yBAAyB;;cAE9B,uEAAuE,WAAW;cAClF,2BAA2B,iBAAiB;EACxD,OAAO,eAAe,MAAM,mBAAmB;EAC/C,OAAO,cAAc,MAAM,mBAAmB;EAC9C,WAAW,gBAAgB;EAC3B,WAAW,MAAM;;cAEL,gCAAgC;YAClC,eAAe,YAAY,iBAAiB;WAC7C;WACA;WACA;WACA,8CAA8C;EACvD,YAAY,KAAK,yBAAyB;;cAE9B,0EAA0E,WAAW;cACrF,wBAAwB,iBAAiB;EACrD,OAAO,eAAe,MAAM,mBAAmB;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AQ;EAC1D,WAAW,OAAO,aAAa;EAC/B,WAAW,MAAM,YAAY;;cAEjB,6BAA6B;YAC/B,eAAe,YAAY,iBAAiB;WAC7C;WACA;WACA;WACA,8CAA8C;EACvD,YAAY,KAAK,yBAAyB;;cAE9B,uEAAuE,WAAW;cAClF,4BAA4B,iBAAiB,kEAAkE;UACnH;EACR,OAAO,OAAO,MAAM,MAAM,mBAAmB;EAC7C,OAAO,cAAc,MAAM,mBAAmB,QAAQ;EACtD,WAAW,OAAO,OAAO;EACzB,WAAW,MAAM,YAAY;;cAEjB,iCAAiC;YACnC,eAAe,YAAY,iBAAiB;WAC7C;WACA;WACA;WACA,8CAA8C;EACvD,YAAY,KAAK,yBAAyB;;cAE9B,2EAA2E,WAAW;cACtF,wBAAwB,iBAAiB,sDAAsD,WAAW;EACtH,OAAO,OAAO,WAAW,MAAM,mBAAmB;EAClD,OAAO,eAAe,WAAW,MAAM,mBAAmB,QAAQ;EAClE,WAAW,OAAO,YAAY;EAC9B,WAAW,MAAM,YAAY;;cAEjB,6BAA6B;YAC/B,eAAe,YAAY,iBAAiB;WAC7C;WACA;WACA;WACA,8CAA8C;EACvD,YAAY,KAAK,yBAAyB;;cAE9B,uEAAuE,WAAW;cAClF,0BAA0B,iBAAiB;EACvD,OAAO,eAAe,MAAM,mBAAmB;;;;;;;EAO/C,OAAO,gCAAgC,MAAM,mBAAmB;EAChE,WAAW,gBAAgB;EAC3B,WAAW,MAAM;;cAEL,+BAA+B;YACjC,eAAe,YAAY,iBAAiB;WAC7C;WACA;WACA;WACA,8CAA8C;EACvD,YAAY,KAAK,yBAAyB;;cAE9B,yEAAyE,WAAW;;;;;;;;cAQpF,qBAAqB;cACrB,+BAA+B"}
@@ -1,6 +1,6 @@
1
- import { n as AnySqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
2
- import "./codec-descriptor-CyCQXvSl.mjs";
3
- import { n as SqliteCodecRegistry } from "./types-C5FSREvo-Bm6N5Kog.mjs";
1
+ import { n as AnySqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
2
+ import "./codec-descriptor-vwfD3BMy.mjs";
3
+ import { n as SqliteCodecRegistry } from "./types-C5FSREvo-CwUlKK34.mjs";
4
4
  import { r as SqliteDdlNode } from "./nodes-D8EC1yCx-rpfpuJ4T.mjs";
5
5
  import "./ddl-CfSqNT0M.mjs";
6
6
  import { t as parseSqliteDefault } from "./default-normalizer-B9V7TY5u.mjs";
@@ -114,4 +114,4 @@ declare class SqliteControlAdapter implements SqlControlAdapter<'sqlite'> {
114
114
  declare const sqliteAdapterDescriptor: SqlControlAdapterDescriptor<'sqlite'>;
115
115
  //#endregion
116
116
  export { sqliteAdapterDescriptor as i, createSqliteBuiltinCodecLookup as n, createSqliteCodecRegistryWithBuiltins as r, SqliteControlAdapter as t };
117
- //# sourceMappingURL=control-cahq7u71.d.mts.map
117
+ //# sourceMappingURL=control-CLirKz11.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-cahq7u71.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;iBAciB,sCAAsC,4BAA4B,6BAA6B;;;;;;iBAM/F,kCAAkC;;;cAGrC,gCAAgC;WACnC;WACA;mBACQ;EACjB,YAAY,eAAe;WAClB,yBAAyB;WACzB,4BAA4B;EACrC,yCAAyC;EACzC,uCAAuC;;;;;;;;;EASvC,MAAM,KAAK,cAAc,eAAe,SAAS,0BAA0B;;;;;;;;EAQ3E,sBAAsB,KAAK,cAAc,eAAe,UAAU,0BAA0B,QAAQ;;;;;;EAMpG,WAAW,QAAQ,oCAAoC,gBAAgB,QAAQ;EAC/E,wBAAwB,QAAQ,oCAAoC,gBAAgB,QAAQ;;;;;;EAM5F,eAAe,QAAQ,qCAAqC,QAAQ,oBAAoB;UAChF;;;;;;EAMR,WAAW,QAAQ,oCAAoC,iBAAiB,iBAAiB;UACjF;;;;;;EAM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;;;;cAIzE,yBAAyB"}
@@ -0,0 +1,34 @@
1
+ import { t as sqliteAggregateDescriptors } from "./aggregates-CTDRDyvD.mjs";
2
+ import { a as sqliteCodecRegistry } from "./codecs-BaoqGdxT.mjs";
3
+ //#region ../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-DjKgG4z5.mjs
4
+ const sqliteAdapterDescriptorMeta = {
5
+ kind: "adapter",
6
+ familyId: "sql",
7
+ targetId: "sqlite",
8
+ id: "sqlite",
9
+ version: "0.0.1",
10
+ capabilities: { sql: {
11
+ orderBy: true,
12
+ limit: true,
13
+ lateral: false,
14
+ jsonAgg: true,
15
+ returning: true,
16
+ foreignKeys: true,
17
+ enums: false
18
+ } },
19
+ types: {
20
+ aggregateDescriptors: sqliteAggregateDescriptors,
21
+ codecTypes: {
22
+ codecDescriptors: Array.from(sqliteCodecRegistry.values()).filter((d) => d.renderOutputType === void 0),
23
+ import: {
24
+ package: "@internal/adapter-sqlite/codec-types",
25
+ named: "CodecTypes",
26
+ alias: "SqliteTypes"
27
+ }
28
+ }
29
+ }
30
+ };
31
+ //#endregion
32
+ export { sqliteAdapterDescriptorMeta as t };
33
+
34
+ //# sourceMappingURL=descriptor-meta-DjKgG4z5-CDdHwPoG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor-meta-DjKgG4z5-CDdHwPoG.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-DjKgG4z5.mjs"],"sourcesContent":["import { sqliteCodecRegistry } from \"@internal/target-sqlite/codecs\";\nimport { sqliteAggregateDescriptors } from \"@internal/target-sqlite/aggregates\";\nconst sqliteAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: { sql: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: false,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tforeignKeys: true,\n\t\tenums: false\n\t} },\n\ttypes: {\n\t\taggregateDescriptors: sqliteAggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(sqliteCodecRegistry.values()).filter((d) => d.renderOutputType === void 0),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/adapter-sqlite/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"SqliteTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { sqliteAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DjKgG4z5.mjs.map"],"mappings":";;;AAEA,MAAM,8BAA8B;CACnC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE,KAAK;EACpB,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,aAAa;EACb,OAAO;CACR,EAAE;CACF,OAAO;EACN,sBAAsB;EACtB,YAAY;GACX,kBAAkB,MAAM,KAAK,oBAAoB,OAAO,CAAC,CAAC,CAAC,QAAQ,MAAM,EAAE,qBAAqB,KAAK,CAAC;GACtG,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
@@ -1,4 +1,4 @@
1
- import { t as CodecTypes } from "./codec-types-DKB--ltR-CIuvX0zx.mjs";
1
+ import { t as CodecTypes } from "./codec-types-DOyikA9Q-DVHiIZxI.mjs";
2
2
  //#region ../../../3-targets/3-targets/sqlite/dist/pack.d.mts
3
3
  //#region src/core/descriptor-meta.d.ts
4
4
  declare const sqliteTargetDescriptorMetaBase: {
@@ -90,4 +90,4 @@ declare const sqliteTargetDescriptorMeta: typeof sqliteTargetDescriptorMetaBase
90
90
  };
91
91
  //#endregion
92
92
  export { sqliteTargetDescriptorMeta as t };
93
- //# sourceMappingURL=pack-BfwyQ0b3.d.mts.map
93
+ //# sourceMappingURL=pack-Cnu6UOJx.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pack-BfwyQ0b3.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/pack.d.mts"],"mappings":";;;cAEc;WACH;WACA;aACE;eACE;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;uBAIN;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;;;;iBAOZ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;uBACA;;;;iBAIN;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;;;;WAQd;WACA;WACA;WACA;WACA;WACA;WACA,eAAe;;cAEZ,mCAAmC;WACtC,eAAe"}
1
+ {"version":3,"file":"pack-Cnu6UOJx.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/pack.d.mts"],"mappings":";;;cAEc;WACH;WACA;aACE;eACE;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;uBAIN;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;;;;iBAOZ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;uBACA;;;;iBAIN;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;;;;WAQd;WACA;WACA;WACA;WACA;WACA;WACA,eAAe;;cAEZ,mCAAmC;WACtC,eAAe"}
@@ -1,8 +1,8 @@
1
1
  import { a as DropColumnCall, d as buildColumnTypeSql, f as buildRecreatePostchecks, i as DataTransformCall, l as RecreateTableCall, m as renderDefaultLiteral, n as CreateIndexCall, o as DropIndexCall, p as buildRecreateSummary, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as buildColumnDefaultSql } from "./op-factory-call-C_or6163-B_LDzC37.mjs";
2
2
  import { t as CONTROL_TABLE_NAMES } from "./control-tables-D_o8dKRB-BXi43noL.mjs";
3
3
  import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-C8nxPT0P-DdBqfmAD.mjs";
4
- import { blindCast } from "@prisma/orm-framework/utils/casts";
5
4
  import { DdlColumn, ForeignKeyConstraint, FunctionColumnDefault, LiteralColumnDefault, PrimaryKeyConstraint, UniqueConstraint } from "@prisma/orm-family-sql/relational-core/ast";
5
+ import { blindCast } from "@prisma/orm-framework/utils/casts";
6
6
  import { diffSchemas, issueOutcome, orderIssuesByDependencies } from "@prisma/orm-framework/components/control";
7
7
  import { UNBOUND_NAMESPACE_ID, entityAt } from "@prisma/orm-framework/components/ir";
8
8
  import { buildNativeTypeExpander, contractToSchemaIR, extractCodecControlHooks, planFieldEventOperations, plannerFailure } from "@prisma/orm-family-sql/family/control";
@@ -808,4 +808,4 @@ function retainUnownedExtras(issues, ownership) {
808
808
  //#endregion
809
809
  export { verifySqliteDatabaseSchema as a, sqliteContractToSchema as i, createSqliteMigrationPlanner as n, diffSqliteSchema as r, SqliteMigrationPlanner as t };
810
810
 
811
- //# sourceMappingURL=planner-DiGcIjl1-QnNAhVmX.mjs.map
811
+ //# sourceMappingURL=planner-DiGcIjl1-oFtDTY7-.mjs.map