@prisma/orm-target-sqlite 8.0.0-rc.18-dev.32 → 8.0.0-rc.18-dev.33

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 (96) hide show
  1. package/dist/{adapter-7m8HU4rt-C0WTjmyV.mjs → adapter-7m8HU4rt-Wtw2YQMD.mjs} +4 -4
  2. package/dist/{adapter-7m8HU4rt-C0WTjmyV.mjs.map → adapter-7m8HU4rt-Wtw2YQMD.mjs.map} +1 -1
  3. package/dist/{adapter-B5StHbH_.d.mts → adapter-rNrGhNM6.d.mts} +8 -8
  4. package/dist/{adapter-B5StHbH_.d.mts.map → adapter-rNrGhNM6.d.mts.map} +1 -1
  5. package/dist/{adapter-xFPDhkod-Cn2BkvM_.d.mts → adapter-xFPDhkod-BsfRQfp6.d.mts} +6 -6
  6. package/dist/{adapter-xFPDhkod-Cn2BkvM_.d.mts.map → adapter-xFPDhkod-BsfRQfp6.d.mts.map} +1 -1
  7. package/dist/adapter.d.mts +10 -10
  8. package/dist/adapter.mjs +2 -2
  9. package/dist/adapter__adapter.d.mts +3 -3
  10. package/dist/adapter__adapter.mjs +1 -1
  11. package/dist/adapter__codec-types.d.mts +3 -3
  12. package/dist/adapter__control.d.mts +2 -2
  13. package/dist/adapter__control.mjs +4 -4
  14. package/dist/adapter__runtime.d.mts +1 -1
  15. package/dist/adapter__runtime.mjs +3 -3
  16. package/dist/adapter__sql-renderer.d.mts +2 -2
  17. package/dist/adapter__sql-renderer.mjs +1 -1
  18. package/dist/adapter__types.d.mts +3 -3
  19. package/dist/{aggregates-DD6XxtyA.d.mts → aggregates-C91ltL9M.d.mts} +6 -6
  20. package/dist/{aggregates-DD6XxtyA.d.mts.map → aggregates-C91ltL9M.d.mts.map} +1 -1
  21. package/dist/codec-descriptor-3oN7rtrW-Dk5P8NLm.d.mts +1 -0
  22. package/dist/{codec-descriptor-CbMiyuVV-CiLsv8hg.mjs → codec-descriptor-DRmF-crq-BzlPCPyM.mjs} +5 -4
  23. package/dist/codec-descriptor-DRmF-crq-BzlPCPyM.mjs.map +1 -0
  24. package/dist/{codec-descriptor-DT3GA29e-D9jjnVIM.d.mts → codec-descriptor-DuW-d9ef-CLGWK2wF.d.mts} +5 -2
  25. package/dist/codec-descriptor-DuW-d9ef-CLGWK2wF.d.mts.map +1 -0
  26. package/dist/codec-descriptor-WwE5fA08.d.mts +2 -0
  27. package/dist/codec-types-CLxV6VvX.d.mts +1 -0
  28. package/dist/{codec-types-cWQQVtK1-DLZaguM6.d.mts → codec-types-COh75Bop-YF2hiOlF.d.mts} +5 -5
  29. package/dist/{codec-types-cWQQVtK1-DLZaguM6.d.mts.map → codec-types-COh75Bop-YF2hiOlF.d.mts.map} +1 -1
  30. package/dist/codec-types-D0VxUBSx.d.mts +2 -0
  31. package/dist/codecs-BFV0ef0d.d.mts +1 -0
  32. package/dist/{codecs-Czl6o-9D-D8z124aj.d.mts → codecs-BJYruC-a-gv28KlTa.d.mts} +8 -3
  33. package/dist/codecs-BJYruC-a-gv28KlTa.d.mts.map +1 -0
  34. package/dist/{codecs-D0Y2Iav-.mjs → codecs-Bzf25UZA.mjs} +3 -3
  35. package/dist/{codecs-D0Y2Iav-.mjs.map → codecs-Bzf25UZA.mjs.map} +1 -1
  36. package/dist/{codecs-B8qHPY7E-BkymMUIl.mjs → codecs-CMvatsBb-B_Cyw7c5.mjs} +32 -6
  37. package/dist/codecs-CMvatsBb-B_Cyw7c5.mjs.map +1 -0
  38. package/dist/{control-CkRHoUVL.mjs → control-Cxi6ijT_.mjs} +6 -6
  39. package/dist/{control-CkRHoUVL.mjs.map → control-Cxi6ijT_.mjs.map} +1 -1
  40. package/dist/{control-OMAB1Bql.d.mts → control-Q2TqoG2O.d.mts} +3 -3
  41. package/dist/{control-OMAB1Bql.d.mts.map → control-Q2TqoG2O.d.mts.map} +1 -1
  42. package/dist/{data-type-entries-vJawTygC-GvAHhBjx.mjs → data-type-entries-BgPuECPi-BhJynZso.mjs} +6 -2
  43. package/dist/{data-type-entries-vJawTygC-GvAHhBjx.mjs.map → data-type-entries-BgPuECPi-BhJynZso.mjs.map} +1 -1
  44. package/dist/{descriptor-meta-CoUnSc0y-BPbG5Fsw.mjs → descriptor-meta-BOzaO0HD-DRx0pw23.mjs} +3 -3
  45. package/dist/{descriptor-meta-CoUnSc0y-BPbG5Fsw.mjs.map → descriptor-meta-BOzaO0HD-DRx0pw23.mjs.map} +1 -1
  46. package/dist/{descriptor-meta-DrNwC4vO-uIjsn4Ej.mjs → descriptor-meta-DrNwC4vO-vTq5nRuc.mjs} +2 -2
  47. package/dist/{descriptor-meta-DrNwC4vO-uIjsn4Ej.mjs.map → descriptor-meta-DrNwC4vO-vTq5nRuc.mjs.map} +1 -1
  48. package/dist/{migration-BSIkMAkA.mjs → migration-B5NMdcC0.mjs} +2 -2
  49. package/dist/{migration-BSIkMAkA.mjs.map → migration-B5NMdcC0.mjs.map} +1 -1
  50. package/dist/{op-factory-call-CfjtzREa-D7ekvaLZ.mjs → op-factory-call-Dzsgcf3B-B7IaqEjE.mjs} +3 -3
  51. package/dist/{op-factory-call-CfjtzREa-D7ekvaLZ.mjs.map → op-factory-call-Dzsgcf3B-B7IaqEjE.mjs.map} +1 -1
  52. package/dist/{pack-Dx_IcF6h.d.mts → pack-Cqm0tlQN.d.mts} +3 -3
  53. package/dist/{pack-Dx_IcF6h.d.mts.map → pack-Cqm0tlQN.d.mts.map} +1 -1
  54. package/dist/{planner-produced-sqlite-migration-DyUEoJy4-CdhYzmpx.mjs → planner-produced-sqlite-migration-CKJHko4I-BEJtzF_V.mjs} +4 -4
  55. package/dist/{planner-produced-sqlite-migration-DyUEoJy4-CdhYzmpx.mjs.map → planner-produced-sqlite-migration-CKJHko4I-BEJtzF_V.mjs.map} +1 -1
  56. package/dist/{planner-DxJLBjRO-Yve5OYci.mjs → planner-qr5hYxOR-DaF99VUh.mjs} +5 -5
  57. package/dist/{planner-DxJLBjRO-Yve5OYci.mjs.map → planner-qr5hYxOR-DaF99VUh.mjs.map} +1 -1
  58. package/dist/{render-ops-EKDIreH1-BA3sLqIW.mjs → render-ops-DG-QUw8Q-DC6TMBgU.mjs} +3 -3
  59. package/dist/{render-ops-EKDIreH1-BA3sLqIW.mjs.map → render-ops-DG-QUw8Q-DC6TMBgU.mjs.map} +1 -1
  60. package/dist/{runtime-CoHjq3cs.d.mts → runtime-BoSV7f77.d.mts} +2 -2
  61. package/dist/{runtime-CoHjq3cs.d.mts.map → runtime-BoSV7f77.d.mts.map} +1 -1
  62. package/dist/sql-renderer-CAeE61w9.d.mts +1 -0
  63. package/dist/{sqlite-migration-DZJSPfnT--Tf8_tGA.mjs → sqlite-migration-CIiyprmJ-DIPNf3Rm.mjs} +5 -5
  64. package/dist/{sqlite-migration-DZJSPfnT--Tf8_tGA.mjs.map → sqlite-migration-CIiyprmJ-DIPNf3Rm.mjs.map} +1 -1
  65. package/dist/target.d.mts +8 -8
  66. package/dist/target.mjs +11 -11
  67. package/dist/target__aggregates.d.mts +1 -1
  68. package/dist/target__codec-descriptor.d.mts +2 -2
  69. package/dist/target__codec-descriptor.mjs +1 -1
  70. package/dist/target__codec-types.d.mts +3 -3
  71. package/dist/target__codecs.d.mts +2 -2
  72. package/dist/target__codecs.mjs +2 -2
  73. package/dist/target__control.mjs +1 -1
  74. package/dist/target__data-types.mjs +1 -1
  75. package/dist/target__migration.mjs +2 -2
  76. package/dist/target__op-factory-call.mjs +1 -1
  77. package/dist/target__pack.d.mts +1 -1
  78. package/dist/target__pack.mjs +1 -1
  79. package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
  80. package/dist/target__planner.mjs +1 -1
  81. package/dist/target__render-ops.mjs +1 -1
  82. package/dist/types-B-VvUwz6.d.mts +2 -0
  83. package/dist/{types-RJMd2PlL-BT8T5Z6C.d.mts → types-RJMd2PlL-EuhZF7B6.d.mts} +3 -3
  84. package/dist/{types-RJMd2PlL-BT8T5Z6C.d.mts.map → types-RJMd2PlL-EuhZF7B6.d.mts.map} +1 -1
  85. package/package.json +9 -9
  86. package/dist/codec-descriptor-BU0P0hxL.d.mts +0 -2
  87. package/dist/codec-descriptor-CbMiyuVV-CiLsv8hg.mjs.map +0 -1
  88. package/dist/codec-descriptor-DT3GA29e-D9jjnVIM.d.mts.map +0 -1
  89. package/dist/codec-descriptor-EUFGq72N-BlLkoKCl.d.mts +0 -1
  90. package/dist/codec-types-B0Y3oOtp.d.mts +0 -2
  91. package/dist/codec-types-CLbKwUAt.d.mts +0 -1
  92. package/dist/codecs-B8qHPY7E-BkymMUIl.mjs.map +0 -1
  93. package/dist/codecs-Czl6o-9D-D8z124aj.d.mts.map +0 -1
  94. package/dist/codecs-IWXre1ae.d.mts +0 -1
  95. package/dist/sql-renderer-CpblYb5l.d.mts +0 -1
  96. package/dist/types-DA9lzh9t.d.mts +0 -2
@@ -1,9 +1,9 @@
1
- import { n as createSqliteBuiltinCodecLookup, r as createSqliteCodecRegistryWithBuiltins, t as assembleSqliteCodecRegistry } from "./codecs-D0Y2Iav-.mjs";
1
+ import { n as createSqliteBuiltinCodecLookup, r as createSqliteCodecRegistryWithBuiltins, t as assembleSqliteCodecRegistry } from "./codecs-Bzf25UZA.mjs";
2
2
  import { t as readSqliteDefault } from "./default-normalizer-DGMXypHg-Q0mNIQC6.mjs";
3
3
  import { n as escapeLiteral, r as quoteIdentifier } from "./sql-utils-XGT5Esi2-5k9pvJeF.mjs";
4
- import { n as sqlitePslTypeConstructors } from "./control-CkRHoUVL.mjs";
5
- import { t as SqliteControlAdapter } from "./adapter-7m8HU4rt-C0WTjmyV.mjs";
6
- import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DrNwC4vO-uIjsn4Ej.mjs";
4
+ import { n as sqlitePslTypeConstructors } from "./control-Cxi6ijT_.mjs";
5
+ import { t as SqliteControlAdapter } from "./adapter-7m8HU4rt-Wtw2YQMD.mjs";
6
+ import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DrNwC4vO-vTq5nRuc.mjs";
7
7
  //#region ../../../3-targets/6-adapters/sqlite/dist/control.mjs
8
8
  function databaseFunction(expression) {
9
9
  return {
@@ -1,2 +1,2 @@
1
- import { n as sqliteRuntimeAdapterDescriptor, t as SqliteRuntimeAdapterInstance } from "./runtime-CoHjq3cs.mjs";
1
+ import { n as sqliteRuntimeAdapterDescriptor, t as SqliteRuntimeAdapterInstance } from "./runtime-BoSV7f77.mjs";
2
2
  export { type SqliteRuntimeAdapterInstance, sqliteRuntimeAdapterDescriptor as default };
@@ -1,6 +1,6 @@
1
- import { i as sqliteCodecDescriptorRegistry, t as assembleSqliteCodecRegistry } from "./codecs-D0Y2Iav-.mjs";
2
- import { a as sqliteRawCodecInferer, r as createSqliteAdapterWithCodecRegistry } from "./adapter-7m8HU4rt-C0WTjmyV.mjs";
3
- import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DrNwC4vO-uIjsn4Ej.mjs";
1
+ import { i as sqliteCodecDescriptorRegistry, t as assembleSqliteCodecRegistry } from "./codecs-Bzf25UZA.mjs";
2
+ import { a as sqliteRawCodecInferer, r as createSqliteAdapterWithCodecRegistry } from "./adapter-7m8HU4rt-Wtw2YQMD.mjs";
3
+ import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DrNwC4vO-vTq5nRuc.mjs";
4
4
  import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
5
5
  import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
6
6
  import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
@@ -1,3 +1,3 @@
1
- import { r as renderLoweredSql } from "./adapter-xFPDhkod-Cn2BkvM_.mjs";
2
- import "./sql-renderer-CpblYb5l.mjs";
1
+ import { r as renderLoweredSql } from "./adapter-xFPDhkod-BsfRQfp6.mjs";
2
+ import "./sql-renderer-CAeE61w9.mjs";
3
3
  export { renderLoweredSql };
@@ -1,2 +1,2 @@
1
- import { i as renderLoweredSql } from "./adapter-7m8HU4rt-C0WTjmyV.mjs";
1
+ import { i as renderLoweredSql } from "./adapter-7m8HU4rt-Wtw2YQMD.mjs";
2
2
  export { renderLoweredSql };
@@ -1,4 +1,4 @@
1
- import { n as SqliteContract, r as SqliteLoweredStatement, t as SqliteAdapterOptions } from "./types-RJMd2PlL-BT8T5Z6C.mjs";
2
- import { o as SqliteCodecRegistry } from "./codecs-Czl6o-9D-D8z124aj.mjs";
3
- import "./types-DA9lzh9t.mjs";
1
+ import { n as SqliteContract, r as SqliteLoweredStatement, t as SqliteAdapterOptions } from "./types-RJMd2PlL-EuhZF7B6.mjs";
2
+ import { o as SqliteCodecRegistry } from "./codecs-BJYruC-a-gv28KlTa.mjs";
3
+ import "./types-B-VvUwz6.mjs";
4
4
  export type { SqliteAdapterOptions, SqliteCodecRegistry, SqliteContract, SqliteLoweredStatement };
@@ -33,7 +33,7 @@ declare const sqliteAggregateDescriptors: readonly [{
33
33
  readonly operation: "sum";
34
34
  readonly input: {
35
35
  readonly kind: "codec";
36
- readonly codecId: "sql/int@1" | "sqlite/bigintnumber@1" | "sqlite/integer@1" | "sqlite/bigint@1";
36
+ readonly codecId: "sql/int@1" | "sqlite/integer@1" | "sqlite/bigint@1" | "sqlite/bigintnumber@1";
37
37
  };
38
38
  readonly output: {
39
39
  readonly kind: "codec";
@@ -44,7 +44,7 @@ declare const sqliteAggregateDescriptors: readonly [{
44
44
  readonly operation: "sumBigInt";
45
45
  readonly input: {
46
46
  readonly kind: "codec";
47
- readonly codecId: "sql/int@1" | "sqlite/bigintnumber@1" | "sqlite/integer@1" | "sqlite/bigint@1";
47
+ readonly codecId: "sql/int@1" | "sqlite/integer@1" | "sqlite/bigint@1" | "sqlite/bigintnumber@1";
48
48
  };
49
49
  readonly output: {
50
50
  readonly kind: "codec";
@@ -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/bigintnumber@1" | "sqlite/integer@1" | "sqlite/real@1" | "sqlite/bigint@1";
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/datetime@1" | "sqlite/blob@1" | "sqlite/json@1";
103
+ readonly codecId: "sqlite/blob@1" | "sqlite/datetime@1" | "sqlite/json@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/datetime@1" | "sqlite/blob@1" | "sqlite/json@1";
144
+ readonly codecId: "sqlite/blob@1" | "sqlite/datetime@1" | "sqlite/json@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-DD6XxtyA.d.mts.map
164
+ //# sourceMappingURL=aggregates-C91ltL9M.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aggregates-DD6XxtyA.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/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
+ {"version":3,"file":"aggregates-C91ltL9M.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/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"}
@@ -0,0 +1 @@
1
+ import "./codec-descriptor-DuW-d9ef-CLGWK2wF.mjs";
@@ -1,7 +1,8 @@
1
1
  import { CodecDescriptorImpl, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
2
2
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
3
3
  import { blindCast } from "@prisma/orm-framework/utils/casts";
4
- //#region ../../../3-targets/3-targets/sqlite/dist/codec-descriptor-CbMiyuVV.mjs
4
+ import { InternalError } from "@prisma/orm-framework/utils/internal-error";
5
+ //#region ../../../3-targets/3-targets/sqlite/dist/codec-descriptor-DRmF-crq.mjs
5
6
  const SQLITE_CODEC_DESCRIPTOR_KIND = "sqlite-codec";
6
7
  var SqliteCodecDescriptor = class extends CodecDescriptorImpl {
7
8
  descriptorKind = SQLITE_CODEC_DESCRIPTOR_KIND;
@@ -37,8 +38,8 @@ var SqliteCodecDescriptorAdapter = class extends SqliteCodecDescriptor {
37
38
  if (renderOutputType !== void 0) this.renderOutputType = (params) => renderOutputType.call(descriptor, params);
38
39
  const renderInputType = descriptor.renderInputType;
39
40
  if (renderInputType !== void 0) this.renderInputType = (params) => renderInputType.call(descriptor, params);
40
- const renderValueLiteral = descriptor.renderValueLiteral;
41
- if (renderValueLiteral !== void 0) this.renderValueLiteral = (value, side) => renderValueLiteral.call(descriptor, value, side);
41
+ if (descriptor.renderValueLiteral !== void 0) throw new InternalError(`${descriptor.codecId} is a family codec template with its own renderValueLiteral. A family template renders no literal, because only the target knows the form its data type stores a value in; pass renderValueLiteral in the options instead.`);
42
+ if (options.renderValueLiteral !== void 0) this.renderValueLiteral = options.renderValueLiteral;
42
43
  }
43
44
  factory = (params) => this.options.factory(this, this.options.dataType, params);
44
45
  jsonProjection(expression, params) {
@@ -99,4 +100,4 @@ function candidateCodecId(value) {
99
100
  //#endregion
100
101
  export { sqliteCodec as a, isSqliteCodecDescriptor as i, buildSqliteCodecDescriptorRegistry as n, defineSqliteCodecs as r, SqliteCodecDescriptor as t };
101
102
 
102
- //# sourceMappingURL=codec-descriptor-CbMiyuVV-CiLsv8hg.mjs.map
103
+ //# sourceMappingURL=codec-descriptor-DRmF-crq-BzlPCPyM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-descriptor-DRmF-crq-BzlPCPyM.mjs","names":["#descriptors"],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-descriptor-DRmF-crq.mjs"],"sourcesContent":["import { CodecDescriptorImpl, validateCodecTypeParams } from \"@internal/framework-components/codec\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/core/codec-descriptor.ts\nconst SQLITE_CODEC_DESCRIPTOR_KIND = \"sqlite-codec\";\nvar SqliteCodecDescriptor = class extends CodecDescriptorImpl {\n\tdescriptorKind = SQLITE_CODEC_DESCRIPTOR_KIND;\n\tprojectJson(expression, ref) {\n\t\tif (ref.many === true) throw structuredError(\"RUNTIME.CODEC_DESCRIPTOR_ARRAY_UNSUPPORTED\", `Codec '${ref.codecId}' uses CodecRef.many, but SQLite codec descriptors do not support stored scalar arrays.`, {\n\t\t\twhy: \"SQLite has no stored scalar-array codec protocol, so applying a scalar projection to the whole stored array would be ambiguous.\",\n\t\t\tfix: \"Use a scalar CodecRef or introduce an explicit target representation before projecting stored arrays.\",\n\t\t\tmeta: { codecId: ref.codecId }\n\t\t});\n\t\treturn this.jsonProjection(expression, this.validateParams(ref));\n\t}\n\tvalidateParams(ref) {\n\t\treturn blindCast(validateCodecTypeParams(this, ref));\n\t}\n};\nvar SqliteCodecDescriptorAdapter = class extends SqliteCodecDescriptor {\n\toptions;\n\tdataType;\n\tcodecId;\n\ttraits;\n\tparamsSchema;\n\trenderOutputType;\n\trenderInputType;\n\trenderValueLiteral;\n\tconstructor(descriptor, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.dataType = options.dataType.id;\n\t\tthis.codecId = descriptor.codecId;\n\t\tthis.traits = descriptor.traits;\n\t\tthis.paramsSchema = blindCast(options.dataType.params);\n\t\tconst renderOutputType = descriptor.renderOutputType;\n\t\tif (renderOutputType !== void 0) this.renderOutputType = (params) => renderOutputType.call(descriptor, params);\n\t\tconst renderInputType = descriptor.renderInputType;\n\t\tif (renderInputType !== void 0) this.renderInputType = (params) => renderInputType.call(descriptor, params);\n\t\tif (descriptor.renderValueLiteral !== void 0) throw new InternalError(`${descriptor.codecId} is a family codec template with its own renderValueLiteral. A family template renders no literal, because only the target knows the form its data type stores a value in; pass renderValueLiteral in the options instead.`);\n\t\tif (options.renderValueLiteral !== void 0) this.renderValueLiteral = options.renderValueLiteral;\n\t}\n\tfactory = (params) => this.options.factory(this, this.options.dataType, params);\n\tjsonProjection(expression, params) {\n\t\treturn this.options.jsonProjection(expression, params);\n\t}\n};\nfunction sqliteCodec(descriptor, options) {\n\treturn blindCast(new SqliteCodecDescriptorAdapter(descriptor, options));\n}\nfunction defineSqliteCodecs(descriptors) {\n\treturn descriptors;\n}\nfunction isSqliteCodecDescriptor(value) {\n\treturn typeof value === \"object\" && value !== null && \"descriptorKind\" in value && value.descriptorKind === SQLITE_CODEC_DESCRIPTOR_KIND && \"codecId\" in value && typeof value.codecId === \"string\" && \"traits\" in value && Array.isArray(value.traits) && \"paramsSchema\" in value && (value.paramsSchema === void 0 || isObjectLike(value.paramsSchema) && \"~standard\" in value.paramsSchema && isObjectLike(value.paramsSchema[\"~standard\"]) && \"validate\" in value.paramsSchema[\"~standard\"] && typeof value.paramsSchema[\"~standard\"].validate === \"function\") && \"isParameterized\" in value && typeof value.isParameterized === \"boolean\" && \"factory\" in value && typeof value.factory === \"function\" && \"projectJson\" in value && typeof value.projectJson === \"function\";\n}\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null || typeof value === \"function\";\n}\nvar SqliteCodecDescriptorRegistryImpl = class {\n\t#descriptors;\n\tconstructor(descriptors) {\n\t\tthis.#descriptors = descriptors;\n\t\tObject.freeze(this);\n\t}\n\tdescriptorFor(codecId) {\n\t\treturn this.#descriptors.get(codecId);\n\t}\n\t*values() {\n\t\tyield* this.#descriptors.values();\n\t}\n};\nfunction buildSqliteCodecDescriptorRegistry(descriptors) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (!isSqliteCodecDescriptor(descriptor)) {\n\t\t\tconst codecId = candidateCodecId(descriptor);\n\t\t\tthrow structuredError(\"RUNTIME.CODEC_DESCRIPTOR_INVALID\", `Codec descriptor '${codecId}' is not a valid SQLite codec descriptor.`, {\n\t\t\t\twhy: \"SQLite codec registries require the sqlite-codec discriminant and complete target descriptor methods.\",\n\t\t\t\tfix: \"Extend SqliteCodecDescriptor or adapt a generic descriptor with sqliteCodec().\",\n\t\t\t\tmeta: { codecId }\n\t\t\t});\n\t\t}\n\t\tif (byId.has(descriptor.codecId)) throw structuredError(\"RUNTIME.DUPLICATE_CODEC\", `Duplicate SQLite codec descriptor id '${descriptor.codecId}'.`, {\n\t\t\twhy: \"Each codecId must resolve to exactly one SQLite descriptor during registry composition.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: {\n\t\t\t\tcodecId: descriptor.codecId,\n\t\t\t\ttarget: \"sqlite\"\n\t\t\t}\n\t\t});\n\t\tbyId.set(descriptor.codecId, descriptor);\n\t}\n\treturn new SqliteCodecDescriptorRegistryImpl(byId);\n}\nfunction candidateCodecId(value) {\n\treturn typeof value === \"object\" && value !== null && \"codecId\" in value && typeof value.codecId === \"string\" ? value.codecId : \"<unknown>\";\n}\n//#endregion\nexport { sqliteCodec as a, isSqliteCodecDescriptor as i, buildSqliteCodecDescriptorRegistry as n, defineSqliteCodecs as r, SqliteCodecDescriptor as t };\n\n//# sourceMappingURL=codec-descriptor-DRmF-crq.mjs.map"],"mappings":";;;;;AAKA,MAAM,+BAA+B;AACrC,IAAI,wBAAwB,cAAc,oBAAoB;CAC7D,iBAAiB;CACjB,YAAY,YAAY,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CACA,OAAO,IAAI,kCAAkC,IAAI;AAClD;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,aAAa,SAAS,OAAO,MAAM,YAAY,WAAW,MAAM,UAAU;AACjI"}
@@ -1,6 +1,7 @@
1
1
  import { ProjectionExpr } from "@prisma/orm-family-sql/relational-core/ast";
2
2
  import { AnyCodecDescriptor, AnyCodecDescriptorTemplate, Codec, CodecDescriptor, CodecDescriptorImpl, CodecDescriptorTemplate, CodecInstanceContext, CodecRef as CodecRef$1, CodecTrait, DataType } from "@prisma/orm-framework/components/codec";
3
- //#region ../../../3-targets/3-targets/sqlite/dist/codec-descriptor-DT3GA29e.d.mts
3
+ import { JsonValue } from "@prisma/orm-framework/contract/types";
4
+ //#region ../../../3-targets/3-targets/sqlite/dist/codec-descriptor-DuW-d9ef.d.mts
4
5
  //#region src/core/codec-descriptor.d.ts
5
6
  declare const SQLITE_CODEC_DESCRIPTOR_KIND: "sqlite-codec";
6
7
  interface AnySqliteCodecDescriptor extends AnyCodecDescriptor {
@@ -22,6 +23,8 @@ interface SqliteCodecOptions<P, C extends Codec<string, readonly CodecTrait[], u
22
23
  * adapted codec's parameter schema is this data type's, not the template's.
23
24
  */
24
25
  readonly dataType: DataType;
26
+ /** Renders the literal of the value the codec reads from a stored value of `dataType`. A family template renders no literal, because only the target knows the form its data type stores a value in, so the adapted codec renders with this and never with a renderer on the template. */
27
+ readonly renderValueLiteral?: (value: JsonValue, side: 'output' | 'input') => string | undefined;
25
28
  readonly jsonProjection: (expression: ProjectionExpr, params: P) => ProjectionExpr;
26
29
  /**
27
30
  * Builds the codec: the family codec, or a subclass with SQLite's own rules, constructed with `dataType` and the column's parameters, because a family template names no data type and so builds no codec of its own.
@@ -39,4 +42,4 @@ interface SqliteCodecDescriptorRegistry {
39
42
  declare function buildSqliteCodecDescriptorRegistry(descriptors: ReadonlyArray<unknown>): SqliteCodecDescriptorRegistry;
40
43
  //#endregion
41
44
  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 };
42
- //# sourceMappingURL=codec-descriptor-DT3GA29e-D9jjnVIM.d.mts.map
45
+ //# sourceMappingURL=codec-descriptor-DuW-d9ef-CLGWK2wF.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-descriptor-DuW-d9ef-CLGWK2wF.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-descriptor-DuW-d9ef.d.mts"],"mappings":";;;;;cAIc;UACJ,iCAAiC;WAChC,uBAAuB;EAChC,YAAY,YAAY,gBAAgB,KAAK,aAAa;;uBAErC,sBAAsB,kBAAkB,oBAAoB,cAAc;WACtF;qBACU,eAAe,YAAY,gBAAgB,QAAQ,IAAI;EAC1E,YAAY,YAAY,gBAAgB,KAAK,aAAa;UAClD;;KAEL,iBAAiB,UAAU,8BAA8B,UAAU,8BAA8B,KAAK;;KAEtG,gBAAgB,UAAU,8BAA8B,WAAW,WAAW;UACzE,mBAAmB,GAAG,UAAU,uBAAuB,kCAAkC,uBAAuB;;;;;WAK/G,UAAU;;WAEV,sBAAsB,OAAO,WAAW;WACxC,iBAAiB,YAAY,gBAAgB,QAAQ,MAAM;;;;WAI3D,UAAU,YAAY,sBAAsB,IAAI,UAAU,UAAU,QAAQ,OAAO,KAAK,yBAAyB;;KAEvH,6BAA6B,UAAU,8BAA8B,KAAK,SAAS,wBAAwB,iBAAiB,OAAO,KAAK,+BAA+B,KAAK;iBAChK,YAAY,UAAU,4BAA4B,YAAY,GAAG,SAAS,mBAAmB,iBAAiB,IAAI,gBAAgB,MAAM,6BAA6B;iBACrK,yBAAyB,6BAA6B,4BAA4B,aAAa,cAAc;iBAC7G,wBAAwB,iBAAiB,SAAS;UACzD;EACR,cAAc,kBAAkB;EAChC,UAAU,iBAAiB;;iBAEZ,mCAAmC,aAAa,yBAAyB"}
@@ -0,0 +1,2 @@
1
+ import "./codec-descriptor-DuW-d9ef-CLGWK2wF.mjs";
2
+ import "./codec-descriptor-3oN7rtrW-Dk5P8NLm.mjs";
@@ -0,0 +1 @@
1
+ import "./codec-types-D0VxUBSx.mjs";
@@ -1,8 +1,8 @@
1
- import { t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-DT3GA29e-D9jjnVIM.mjs";
2
- import "./codec-descriptor-EUFGq72N-BlLkoKCl.mjs";
3
- import { a as SqliteBlobDescriptor, c as SqliteIntegerDescriptor, d as SqliteTextDescriptor, i as SqliteBigintNumberDescriptor, l as SqliteJsonDescriptor, r as SqliteBigintDescriptor, s as SqliteDatetimeDescriptor, u as SqliteRealDescriptor } from "./codecs-Czl6o-9D-D8z124aj.mjs";
1
+ import { t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-DuW-d9ef-CLGWK2wF.mjs";
2
+ import "./codec-descriptor-3oN7rtrW-Dk5P8NLm.mjs";
3
+ import { a as SqliteBlobDescriptor, c as SqliteIntegerDescriptor, d as SqliteTextDescriptor, i as SqliteBigintNumberDescriptor, l as SqliteJsonDescriptor, r as SqliteBigintDescriptor, s as SqliteDatetimeDescriptor, u as SqliteRealDescriptor } from "./codecs-BJYruC-a-gv28KlTa.mjs";
4
4
  import { ExtractCodecTypes } from "@prisma/orm-family-sql/relational-core/ast";
5
- //#region ../../../3-targets/3-targets/sqlite/dist/codec-types-cWQQVtK1.d.mts
5
+ //#region ../../../3-targets/3-targets/sqlite/dist/codec-types-COh75Bop.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>;
@@ -23,4 +23,4 @@ type Resolve<T> = { readonly [K in keyof T]: { readonly [P in keyof T[K]]: T[K][
23
23
  type CodecTypes = Resolve<ExtractCodecTypes<typeof codecDescriptorMap>>;
24
24
  //#endregion
25
25
  export { CodecTypes as t };
26
- //# sourceMappingURL=codec-types-cWQQVtK1-DLZaguM6.d.mts.map
26
+ //# sourceMappingURL=codec-types-COh75Bop-YF2hiOlF.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codec-types-cWQQVtK1-DLZaguM6.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-types-cWQQVtK1.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;WACR,cAAc;WACd,KAAK,yEAAyE;;KAEpF,QAAQ,iBAAiB,WAAW,gBAAgB,WAAW,EAAE,KAAK,EAAE,GAAG;KAC3E,aAAa,QAAQ,yBAAyB"}
1
+ {"version":3,"file":"codec-types-COh75Bop-YF2hiOlF.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codec-types-COh75Bop.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;WACR,cAAc;WACd,KAAK,yEAAyE;;KAEpF,QAAQ,iBAAiB,WAAW,gBAAgB,WAAW,EAAE,KAAK,EAAE,GAAG;KAC3E,aAAa,QAAQ,yBAAyB"}
@@ -0,0 +1,2 @@
1
+ import "./codecs-BJYruC-a-gv28KlTa.mjs";
2
+ import "./codec-types-COh75Bop-YF2hiOlF.mjs";
@@ -0,0 +1 @@
1
+ import "./codecs-BJYruC-a-gv28KlTa.mjs";
@@ -1,11 +1,11 @@
1
- import { i as SqliteCodecDescriptorRegistry, n as AnySqliteCodecDescriptor, r as SqliteCodecDescriptor } from "./codec-descriptor-DT3GA29e-D9jjnVIM.mjs";
1
+ import { i as SqliteCodecDescriptorRegistry, n as AnySqliteCodecDescriptor, r as SqliteCodecDescriptor } from "./codec-descriptor-DuW-d9ef-CLGWK2wF.mjs";
2
2
  import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-DuJYssXV-BW3y5jTO.mjs";
3
3
  import { ProjectionExpr } from "@prisma/orm-family-sql/relational-core/ast";
4
4
  import { CodecCallContext, CodecImpl, CodecInstanceContext, CodecRegistry, DataTypeValue } from "@prisma/orm-framework/components/codec";
5
5
  import { ComponentMetadata } from "@prisma/orm-framework/components/components";
6
6
  import { JsonValue } from "@prisma/orm-framework/contract/types";
7
7
  import { CodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/query-lane-context";
8
- //#region ../../../3-targets/3-targets/sqlite/dist/codecs-Czl6o-9D.d.mts
8
+ //#region ../../../3-targets/3-targets/sqlite/dist/codecs-BJYruC-a.d.mts
9
9
  //#region src/core/codec-helpers.d.ts
10
10
  /**
11
11
  * 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.
@@ -60,6 +60,7 @@ declare class SqliteTextDescriptor extends SqliteCodecDescriptor<void> {
60
60
  readonly codecId: "sqlite/text@1";
61
61
  readonly traits: readonly ["equality", "order", "textual"];
62
62
  readonly paramsSchema: undefined;
63
+ renderValueLiteral(value: JsonValue): string | undefined;
63
64
  factory(): (ctx: CodecInstanceContext) => SqliteTextCodec;
64
65
  }
65
66
  declare const sqliteTextColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqliteTextCodec, undefined>;
@@ -75,6 +76,7 @@ declare class SqliteIntegerDescriptor extends SqliteCodecDescriptor<void> {
75
76
  readonly codecId: "sqlite/integer@1";
76
77
  readonly traits: readonly ["equality", "order", "numeric"];
77
78
  readonly paramsSchema: undefined;
79
+ renderValueLiteral(value: JsonValue): string | undefined;
78
80
  factory(): (ctx: CodecInstanceContext) => SqliteIntegerCodec;
79
81
  }
80
82
  declare const sqliteIntegerColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqliteIntegerCodec, undefined>;
@@ -90,6 +92,7 @@ declare class SqliteRealDescriptor extends SqliteCodecDescriptor<void> {
90
92
  readonly codecId: "sqlite/real@1";
91
93
  readonly traits: readonly ["equality", "order", "numeric"];
92
94
  readonly paramsSchema: undefined;
95
+ renderValueLiteral(value: JsonValue): string | undefined;
93
96
  factory(): (ctx: CodecInstanceContext) => SqliteRealCodec;
94
97
  }
95
98
  declare const sqliteRealColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqliteRealCodec, undefined>;
@@ -140,6 +143,7 @@ declare class SqliteJsonDescriptor extends SqliteCodecDescriptor<void> {
140
143
  readonly codecId: "sqlite/json@1";
141
144
  readonly traits: readonly ["equality"];
142
145
  readonly paramsSchema: undefined;
146
+ renderValueLiteral(value: JsonValue): string | undefined;
143
147
  factory(): (ctx: CodecInstanceContext) => SqliteJsonCodec;
144
148
  }
145
149
  declare const sqliteJsonColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqliteJsonCodec, undefined>;
@@ -163,6 +167,7 @@ declare class SqliteBigintDescriptor extends SqliteCodecDescriptor<void> {
163
167
  readonly codecId: "sqlite/bigint@1";
164
168
  readonly traits: readonly ["equality", "order", "numeric"];
165
169
  readonly paramsSchema: undefined;
170
+ renderValueLiteral(value: JsonValue): string | undefined;
166
171
  factory(): (ctx: CodecInstanceContext) => SqliteBigintCodec;
167
172
  }
168
173
  declare const sqliteBigintColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqliteBigintCodec, undefined>;
@@ -209,4 +214,4 @@ declare const sqliteCodecRegistry: CodecDescriptorRegistry;
209
214
  declare const sqliteCodecDescriptorRegistry: SqliteCodecDescriptorRegistry;
210
215
  //#endregion
211
216
  export { sqliteJsonColumn as C, sqliteIntegerColumn as S, sqliteTextColumn as T, sqliteBigintNumberColumn as _, SqliteBlobDescriptor as a, sqliteCodecRegistry as b, SqliteIntegerDescriptor as c, SqliteTextDescriptor as d, assembleSqliteCodecRegistry as f, sqliteBigintColumn as g, jsonDocumentRetag as h, SqliteBigintNumberDescriptor as i, SqliteJsonDescriptor as l, createSqliteCodecRegistryWithBuiltins as m, SQLITE_NOW_EXPRESSION as n, SqliteCodecRegistry as o, createSqliteBuiltinCodecLookup as p, SqliteBigintDescriptor as r, SqliteDatetimeDescriptor as s, JsonValue$1 as t, SqliteRealDescriptor as u, sqliteBlobColumn as v, sqliteRealColumn as w, sqliteDatetimeColumn as x, sqliteCodecDescriptorRegistry as y };
212
- //# sourceMappingURL=codecs-Czl6o-9D-D8z124aj.d.mts.map
217
+ //# sourceMappingURL=codecs-BJYruC-a-gv28KlTa.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codecs-BJYruC-a-gv28KlTa.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs-BJYruC-a.d.mts"],"mappings":";;;;;;;;;;;;KAWK;YACO,cAAc;aACb;;;KAGR,mBAAmB,KAAK;KACxB,sBAAsB,gBAAgB;iBAC1B,4BAA4B,QAAQ,kBAAkB,YAAY,cAAc,oBAAoB;iBACpG,sCAAsC,4BAA4B,6BAA6B;;;;;;iBAM/F,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;cAuBrC,oBAAoB,YAAY,mBAAmB;cACnD,wBAAwB,iBAAiB;EACrD,OAAO,eAAe,MAAM,mBAAmB;EAC/C,SAAS,cAAc,MAAM,mBAAmB;EAChD,kBAAkB,OAAO;EACzB,gBAAgB,gBAAgB;;cAEpB,6BAA6B;YAC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WACzD;WACA;WACA;EACT,YAAY,KAAK,yBAAyB;;cAE9B,2EAA2E,WAAW;cACtF,wBAAwB,iBAAiB,sDAAsD,WAAW;EACtH,OAAO,OAAO,WAAW,MAAM,mBAAmB;EAClD,SAAS,eAAe,WAAW,MAAM,mBAAmB,QAAQ;EACpE,kBAAkB,OAAO,wBAAwB;EACjD,gBAAgB,OAAO,YAAY;;;;;;cAMvB,6BAA6B;YAC/B,eAAe,YAAY,iBAAiB;WAC7C,yDAAyD;WACzD;WACA;WACA;EACT,mBAAmB,OAAO;EAC1B,YAAY,KAAK,yBAAyB;;cAE9B,uEAAuE,WAAW;cAClF,0BAA0B,iBAAiB;EACvD,OAAO,eAAe,MAAM,mBAAmB;;;;;;;;;EAS/C,SAAS,gCAAgC,MAAM,mBAAmB;EAClE,kBAAkB,OAAO;EACzB,gBAAgB,gBAAgB;;cAEpB,+BAA+B;YACjC,eAAe,YAAY,iBAAiB;WAC7C,yDAAyD;WACzD;WACA;WACA;EACT,mBAAmB,OAAO;EAC1B,YAAY,KAAK,yBAAyB;;cAE9B,yEAAyE,WAAW;;;;;;;;cAQpF,gCAAgC,iBAAiB;EAC7D,OAAO,eAAe,MAAM,mBAAmB;;;;;;EAM/C,SAAS,gCAAgC,MAAM,mBAAmB;EAClE,kBAAkB,OAAO;EACzB,gBAAgB,gBAAgB;;cAEpB,qCAAqC;YACvC,eAAe,YAAY,iBAAiB;WAC7C,yDAAyD;WACzD;WACA;WACA;EACT,mBAAmB,OAAO;EAC1B,YAAY,KAAK,yBAAyB;;cAE9B,+EAA+E,WAAW;;;;cAI1F;;;;;;;;cAQA,qBAAqB;cACrB,+BAA+B"}
@@ -1,5 +1,5 @@
1
- import { n as buildSqliteCodecDescriptorRegistry } from "./codec-descriptor-CbMiyuVV-CiLsv8hg.mjs";
2
- import { t as codecDescriptors } from "./codecs-B8qHPY7E-BkymMUIl.mjs";
1
+ import { n as buildSqliteCodecDescriptorRegistry } from "./codec-descriptor-DRmF-crq-BzlPCPyM.mjs";
2
+ import { t as codecDescriptors } from "./codecs-CMvatsBb-B_Cyw7c5.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/3-targets/sqlite/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-D0Y2Iav-.mjs.map
49
+ //# sourceMappingURL=codecs-Bzf25UZA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"codecs-D0Y2Iav-.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs.mjs"],"sourcesContent":["import { n as buildSqliteCodecDescriptorRegistry } from \"./codec-descriptor-CbMiyuVV.mjs\";\nimport { a as sqliteBigintNumberColumn, c as sqliteIntegerColumn, d as sqliteTextColumn, i as sqliteBigintColumn, l as sqliteJsonColumn, o as sqliteBlobColumn, r as jsonDocumentRetag, s as sqliteDatetimeColumn, t as codecDescriptors, u as sqliteRealColumn } from \"./codecs-B8qHPY7E.mjs\";\nimport { n as SQLITE_NOW_EXPRESSION } from \"./datetime-text-Bniwehv-.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, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };\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
+ {"version":3,"file":"codecs-Bzf25UZA.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs.mjs"],"sourcesContent":["import { n as buildSqliteCodecDescriptorRegistry } from \"./codec-descriptor-DRmF-crq.mjs\";\nimport { a as sqliteBigintNumberColumn, c as sqliteIntegerColumn, d as sqliteTextColumn, i as sqliteBigintColumn, l as sqliteJsonColumn, o as sqliteBlobColumn, r as jsonDocumentRetag, s as sqliteDatetimeColumn, t as codecDescriptors, u as sqliteRealColumn } from \"./codecs-CMvatsBb.mjs\";\nimport { n as SQLITE_NOW_EXPRESSION } from \"./datetime-text-Bniwehv-.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, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };\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,12 +1,12 @@
1
1
  import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-wgEvkCkg-8bxcCujY.mjs";
2
- import { a as sqliteCodec, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-CbMiyuVV-CiLsv8hg.mjs";
2
+ import { a as sqliteCodec, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-DRmF-crq-BzlPCPyM.mjs";
3
3
  import { a as sqliteCharacterVarying, d as sqliteReal, f as sqliteText, l as sqliteInteger, r as sqliteCharacter, s as sqliteDatetime, t as sqliteBlob, u as sqliteJson } from "./data-types-DaqSwd-t-5j7dnRA8.mjs";
4
4
  import { n as sqliteError } from "./errors-DnR-sMHS-KkMLIP2U.mjs";
5
5
  import { BinaryExpr, CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from "@prisma/orm-family-sql/relational-core/ast";
6
- import { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, floatToJson, readJsonFloat, readJsonIntegerText, refuseJsonValue } from "@prisma/orm-framework/components/codec";
6
+ import { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, floatToJson, readJsonFloat, readJsonIntegerText, refuseJsonValue, renderTsLiteral } from "@prisma/orm-framework/components/codec";
7
7
  import { blindCast } from "@prisma/orm-framework/utils/casts";
8
8
  import { sqlRawDataType } from "@prisma/orm-family-sql/contract/data-type";
9
- //#region ../../../3-targets/3-targets/sqlite/dist/codecs-B8qHPY7E.mjs
9
+ //#region ../../../3-targets/3-targets/sqlite/dist/codecs-CMvatsBb.mjs
10
10
  /**
11
11
  * Projects the expression unchanged, for codecs whose canonical JSON is what
12
12
  * SQLite's own JSON conversion already produces.
@@ -73,8 +73,15 @@ const jsonDocumentRetag = (expression) => isJsonRetag(expression) ? expression :
73
73
  /** Whether an expression is already a retag, so applying one again would only nest. */
74
74
  const isJsonRetag = (expression) => expression instanceof FunctionCallExpr && expression.fn === JSON_RETAG_FN && expression.args.length === 1;
75
75
  const DECIMAL_INTEGER = /^-?\d+$/;
76
- /** Renders the decimal text `sqlite/bigintnumber@1` carries, whose application type is `number`, as a number literal. */
77
- const decimalTextNumberLiteral = (value) => typeof value === "string" && DECIMAL_INTEGER.test(value) ? value : void 0;
76
+ /** 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. */
77
+ function jsonTextLiteral(value) {
78
+ if (typeof value !== "string") return void 0;
79
+ try {
80
+ return renderTsLiteral(JSON.parse(value));
81
+ } catch {
82
+ return;
83
+ }
84
+ }
78
85
  /**
79
86
  * 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.
80
87
  */
@@ -207,11 +214,13 @@ const BLOB_HEX_TEXT = /^(?:[0-9A-F]{2})*$/;
207
214
  const unpaddedCharJsonProjection = (expression) => FunctionCallExpr.of("rtrim", [expression, LiteralExpr.of(" ")]);
208
215
  const sqliteSqlCharDescriptor = sqliteCodec(sqlCharDescriptor, {
209
216
  dataType: sqliteCharacter,
217
+ renderValueLiteral: renderTsLiteral,
210
218
  jsonProjection: unpaddedCharJsonProjection,
211
219
  factory: (descriptor, dataType, params) => () => new SqlCharCodec(descriptor, dataType, params)
212
220
  });
213
221
  const sqliteSqlVarcharDescriptor = sqliteCodec(sqlVarcharDescriptor, {
214
222
  dataType: sqliteCharacterVarying,
223
+ renderValueLiteral: renderTsLiteral,
215
224
  jsonProjection: identityJsonProjection,
216
225
  factory: (descriptor, dataType, params) => () => new SqlVarcharCodec(descriptor, dataType, params)
217
226
  });
@@ -248,11 +257,13 @@ var SqliteSqlIntCodec = class extends SqlIntCodec {
248
257
  };
249
258
  const sqliteSqlIntDescriptor = sqliteCodec(sqlIntDescriptor, {
250
259
  dataType: sqliteInteger,
260
+ renderValueLiteral: decimalTextNumberLiteral,
251
261
  jsonProjection: decimalTextJsonProjection,
252
262
  factory: (descriptor, dataType) => () => new SqliteSqlIntCodec(descriptor, dataType)
253
263
  });
254
264
  const sqliteSqlFloatDescriptor = sqliteCodec(sqlFloatDescriptor, {
255
265
  dataType: sqliteReal,
266
+ renderValueLiteral: floatNumberLiteral,
256
267
  jsonProjection: floatJsonProjection,
257
268
  factory: (descriptor, dataType) => () => new SqliteFloatCodec(descriptor, dataType)
258
269
  });
@@ -282,6 +293,9 @@ var SqliteTextDescriptor = class extends SqliteCodecDescriptor {
282
293
  "textual"
283
294
  ];
284
295
  paramsSchema = void 0;
296
+ renderValueLiteral(value) {
297
+ return renderTsLiteral(value);
298
+ }
285
299
  factory() {
286
300
  return () => new SqliteTextCodec(this, sqliteText);
287
301
  }
@@ -314,6 +328,9 @@ var SqliteIntegerDescriptor = class extends SqliteCodecDescriptor {
314
328
  "numeric"
315
329
  ];
316
330
  paramsSchema = void 0;
331
+ renderValueLiteral(value) {
332
+ return decimalTextNumberLiteral(value);
333
+ }
317
334
  factory() {
318
335
  return () => new SqliteIntegerCodec(this, sqliteInteger);
319
336
  }
@@ -346,6 +363,9 @@ var SqliteRealDescriptor = class extends SqliteCodecDescriptor {
346
363
  "numeric"
347
364
  ];
348
365
  paramsSchema = void 0;
366
+ renderValueLiteral(value) {
367
+ return floatNumberLiteral(value);
368
+ }
349
369
  factory() {
350
370
  return () => new SqliteRealCodec(this, sqliteReal);
351
371
  }
@@ -464,6 +484,9 @@ var SqliteJsonDescriptor = class extends SqliteCodecDescriptor {
464
484
  codecId = SQLITE_JSON_CODEC_ID;
465
485
  traits = ["equality"];
466
486
  paramsSchema = void 0;
487
+ renderValueLiteral(value) {
488
+ return jsonTextLiteral(value);
489
+ }
467
490
  factory() {
468
491
  return () => new SqliteJsonCodec(this, sqliteJson);
469
492
  }
@@ -513,6 +536,9 @@ var SqliteBigintDescriptor = class extends SqliteCodecDescriptor {
513
536
  "numeric"
514
537
  ];
515
538
  paramsSchema = void 0;
539
+ renderValueLiteral(value) {
540
+ return decimalTextBigintLiteral(value);
541
+ }
516
542
  factory() {
517
543
  return () => new SqliteBigintCodec(this, sqliteInteger);
518
544
  }
@@ -589,4 +615,4 @@ const codecDescriptors = defineSqliteCodecs([
589
615
  //#endregion
590
616
  export { sqliteBigintNumberColumn as a, sqliteIntegerColumn as c, sqliteTextColumn as d, sqliteBigintColumn as i, sqliteJsonColumn as l, encodeSqliteDatetime as n, sqliteBlobColumn as o, jsonDocumentRetag as r, sqliteDatetimeColumn as s, codecDescriptors as t, sqliteRealColumn as u };
591
617
 
592
- //# sourceMappingURL=codecs-B8qHPY7E-BkymMUIl.mjs.map
618
+ //# sourceMappingURL=codecs-CMvatsBb-B_Cyw7c5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codecs-CMvatsBb-B_Cyw7c5.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs-CMvatsBb.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-wgEvkCkg.mjs\";\nimport { a as sqliteCharacterVarying, d as sqliteReal, f as sqliteText, l as sqliteInteger, r as sqliteCharacter, s as sqliteDatetime, t as sqliteBlob, u as sqliteJson } from \"./data-types-DaqSwd-t.mjs\";\nimport { a as sqliteCodec, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from \"./codec-descriptor-DRmF-crq.mjs\";\nimport { n as sqliteError } from \"./errors-DnR-sMHS.mjs\";\nimport { BinaryExpr, CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, floatToJson, readJsonFloat, readJsonIntegerText, refuseJsonValue, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\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 a one-element array of its hexadecimal text.\n*\n* SQLite's JSON functions reject a BLOB argument outright, so the encoding has to replace the native\n* conversion rather than post-process it. `hex()` emits uppercase and never wraps. The array is what\n* tells a blob from text: outside a STRICT table a BLOB column may hold text, which passes through as\n* text, as a row carries it, and so does NULL and any other value.\n*/\nconst hexJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: BinaryExpr.eq(FunctionCallExpr.of(\"typeof\", [expression]), LiteralExpr.of(\"blob\")),\n\tvalue: FunctionCallExpr.of(\"json_array\", [FunctionCallExpr.of(\"hex\", [expression])])\n}], 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) => 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);\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\") {\n\t\trequireJsType(codecId, \"bigint\", value);\n\t\treturn value.toString();\n\t}\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};\n/**\n* Requires an integer within ±(2^53 − 1), the range a JS `number` holds\n* exactly. The guard throws rather than rounding: past the boundary a `number`\n* silently loses digits, which is the failure mode these codecs exist to refuse.\n*/\nconst safeIntegerNumber = (codecId, value, code) => {\n\tif (!Number.isSafeInteger(value)) throw sqliteError(code, `${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\tif (Object.is(value, -0)) return 0;\n\treturn value;\n};\n/** The application value a number-flavoured integer codec writes: the JS type it reads, within the range that type holds exactly. */\nconst encodableSafeInteger = (codecId, value) => {\n\trequireJsType(codecId, \"number\", value);\n\treturn safeIntegerNumber(codecId, value, \"RUNTIME.ENCODE_FAILED\");\n};\n/**\n* Converts an exact `bigint` into a safe-range `number`, comparing before any\n* conversion so an out-of-range value throws rather than rounds.\n*/\nconst safeIntegerFromBigint = (codecId, value) => {\n\tif (value < SAFE_INTEGER_BIGINT_RANGE.min || value > SAFE_INTEGER_BIGINT_RANGE.max) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `${codecId} value must be an integer within the safe integer range, got ${value}`, { meta: {\n\t\tcodecId,\n\t\treceived: value.toString()\n\t} });\n\treturn Number(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));\n/**\n* Reads an INTEGER's wire value into a `number`: the number the driver returns for a row, or the decimal text an include carries, because its projection casts the integer to text so that no digit is lost in JSON.\n*/\nfunction safeIntegerWire(codecId, wire) {\n\tif (typeof wire === \"number\") return wire;\n\tif (!DECIMAL_INTEGER.test(wire)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be an integer or its decimal text`, { meta: {\n\t\tcodecId,\n\t\treceived: wire\n\t} });\n\treturn safeIntegerFromBigint(codecId, BigInt(wire));\n}\n/**\n* Reads a REAL's wire value: the number the driver returns for a row, or the text `Infinity` or `-Infinity` an include carries, because JSON has no infinity.\n*/\nfunction floatWire(codecId, wire) {\n\tif (typeof wire === \"number\") return wire;\n\tif (wire === \"Infinity\") return Number.POSITIVE_INFINITY;\n\tif (wire === \"-Infinity\") return Number.NEGATIVE_INFINITY;\n\tthrow sqliteError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be a number, or the text Infinity or -Infinity`, { meta: {\n\t\tcodecId,\n\t\treceived: wire\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);\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: decimalTextJsonProjection,\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\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 value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn safeIntegerWire(SQLITE_INTEGER_CODEC_ID, wire);\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 decimalTextJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_INTEGER_CODEC_ID;\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);\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\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 sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/blob@1 wire value must be bytes, or the array of their hex text an include carries\", { meta: {\n\t\t\tcodecId: SQLITE_BLOB_CODEC_ID,\n\t\t\treceived: String(wire)\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\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\tconst date = new Date(typeof value === \"number\" ? value : asUtcWhenUnmarked(value));\n\tif (Number.isNaN(date.getTime())) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `sqlite/datetime@1 wire value must be a date and time as text, or a number of milliseconds since 1970: ${String(value)}`, { meta: {\n\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n\treturn date;\n}\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/** The text SQLite holds for an instant: what the codec writes for every row, and for a default. */\nfunction encodeSqliteDatetime(value) {\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(input.toISOString());\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\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);\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\treturn typeof wire === \"string\" ? blindCast(JSON.parse(wire)) : wire;\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\n* value is projected as it is: a string the enclosing JSON constructor embeds as a string.\n*/\nvar SqliteJsonDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = sqliteJson.id;\n\tcodecId = SQLITE_JSON_CODEC_ID;\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\trequireJsType(SQLITE_BIGINT_CODEC_ID, \"bigint\", value);\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. A number-typed wire value must therefore be a safe\n\t* integer — past ±(2^53 − 1) it has already rounded, and converting it would\n\t* mint a spuriously-exact `bigint` that need not equal the stored value.\n\t*/\n\tasync fromWire(wire, _ctx) {\n\t\tif (typeof wire === \"number\" && !Number.isSafeInteger(wire)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `sqlite/bigint@1 wire number must be an integer within the safe integer range, got ${String(wire)}`, { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\treceived: String(wire)\n\t\t} });\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\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 decimalTextJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_BIGINT_CODEC_ID;\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, in safe-integer mode, a\n\t* `bigint`; a bigint (or decimal text) is range-checked exactly before any\n\t* conversion to `number`, so an out-of-range value throws rather than rounds.\n\t*/\n\tasync fromWire(wire, _ctx) {\n\t\tif (typeof wire === \"number\") return safeIntegerNumber(SQLITE_BIGINT_NUMBER_CODEC_ID, wire, \"RUNTIME.DECODE_FAILED\");\n\t\tif (typeof wire === \"string\" && !DECIMAL_INTEGER.test(wire)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigintnumber@1 wire value must be a decimal string\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_NUMBER_CODEC_ID,\n\t\t\treceived: wire\n\t\t} });\n\t\treturn safeIntegerFromBigint(SQLITE_BIGINT_NUMBER_CODEC_ID, BigInt(wire));\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 decimalTextJsonProjection(expression);\n\t}\n\tdataType = sqliteInteger.id;\n\tcodecId = SQLITE_BIGINT_NUMBER_CODEC_ID;\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\tsqliteJsonDescriptor,\n\tsqliteBigintDescriptor,\n\tsqliteBigintNumberDescriptor\n]);\n//#endregion\nexport { sqliteBigintNumberColumn as a, sqliteIntegerColumn as c, sqliteTextColumn as d, sqliteBigintColumn as i, sqliteJsonColumn as l, encodeSqliteDatetime as n, sqliteBlobColumn as o, jsonDocumentRetag as r, sqliteDatetimeColumn as s, codecDescriptors as t, sqliteRealColumn as u };\n\n//# sourceMappingURL=codecs-CMvatsBb.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,0BAA0B,eAAe;;;;;;;;;AAS/C,MAAM,6BAA6B,eAAe,SAAS,GAAG,YAAY,MAAM;;;;;;;;;AAShF,MAAM,qBAAqB,eAAe,SAAS,GAAG,CAAC;CACtD,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,UAAU;;;;AAId,MAAM,uBAAuB,eAAe,SAAS,GAAG,CAAC;CACxD,WAAW,WAAW,GAAG,YAAY,YAAY,GAAG,OAAO,iBAAiB,CAAC;CAC7E,OAAO,YAAY,GAAG,UAAU;AACjC,GAAG;CACF,WAAW,WAAW,GAAG,YAAY,YAAY,GAAG,OAAO,iBAAiB,CAAC;CAC7E,OAAO,YAAY,GAAG,WAAW;AAClC,CAAC,GAAG,UAAU;AACd,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;AAqBtB,MAAM,qBAAqB,eAAe,YAAY,UAAU,IAAI,aAAa,iBAAiB,GAAG,eAAe,CAAC,UAAU,CAAC;;AAEhI,MAAM,eAAe,eAAe,sBAAsB,oBAAoB,WAAW,OAAO,iBAAiB,WAAW,KAAK,WAAW;AAC5I,MAAM,kBAAkB;;AAExB,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAA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A;CACA;CACA;AACD,CAAC"}
@@ -1,17 +1,17 @@
1
1
  import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-wgEvkCkg-8bxcCujY.mjs";
2
2
  import { n as sqliteError } from "./errors-DnR-sMHS-KkMLIP2U.mjs";
3
- import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-CoUnSc0y-BPbG5Fsw.mjs";
3
+ import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-BOzaO0HD-DRx0pw23.mjs";
4
4
  import { r as quoteIdentifier } from "./sql-utils-XGT5Esi2-5k9pvJeF.mjs";
5
- import { g as conversionCopyOf, p as affinityStorageClasses, y as rebuiltTableName } from "./op-factory-call-CfjtzREa-D7ekvaLZ.mjs";
5
+ import { g as conversionCopyOf, p as affinityStorageClasses, y as rebuiltTableName } from "./op-factory-call-Dzsgcf3B-B7IaqEjE.mjs";
6
6
  import { t as SqliteContractSerializer } from "./sqlite-contract-view-CGv9JoCE-BkT190Ic.mjs";
7
- import { b as verifySqliteDatabaseSchema, h as sqliteContractToSchema, o as diffSqliteSchema } from "./sqlite-migration-DZJSPfnT--Tf8_tGA.mjs";
8
- import { n as createSqliteMigrationPlanner } from "./planner-DxJLBjRO-Yve5OYci.mjs";
7
+ import { b as verifySqliteDatabaseSchema, h as sqliteContractToSchema, o as diffSqliteSchema } from "./sqlite-migration-CIiyprmJ-DIPNf3Rm.mjs";
8
+ import { n as createSqliteMigrationPlanner } from "./planner-qr5hYxOR-DaF99VUh.mjs";
9
9
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
10
10
  import { blindCast } from "@prisma/orm-framework/utils/casts";
11
+ import { InternalError } from "@prisma/orm-framework/utils/internal-error";
11
12
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
12
13
  import { convertedColumnOf, fieldOfColumn, requiredColumnsOfMigration, rowsWithoutValueFailure, runnerFailure, runnerSuccess, sqlTypeLookupsOf, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
13
14
  import { relationalNodeEntityKind, relationalNodeGranularity } from "@prisma/orm-family-sql/schema-ir/types";
14
- import { InternalError } from "@prisma/orm-framework/utils/internal-error";
15
15
  import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
16
16
  import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
17
17
  import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
@@ -577,4 +577,4 @@ const sqlitePslTypeConstructors = {
577
577
  //#endregion
578
578
  export { sqlitePslTypeConstructors as n, sqliteControlTargetDescriptor as t };
579
579
 
580
- //# sourceMappingURL=control-CkRHoUVL.mjs.map
580
+ //# sourceMappingURL=control-Cxi6ijT_.mjs.map