@prisma/orm-target-sqlite 8.0.0-rc.22-dev.4 → 8.0.0-rc.22-dev.6

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 (170) hide show
  1. package/README.md +2 -0
  2. package/dist/{adapter-BHJEOmT6.d.mts → adapter-etFmhVd4.d.mts} +7 -7
  3. package/dist/{adapter-BHJEOmT6.d.mts.map → adapter-etFmhVd4.d.mts.map} +1 -1
  4. package/dist/{adapter-Cff01Cgi-C19Fhc2M.mjs → adapter-gpb0ICA2-DPjB1dMR.mjs} +21 -11
  5. package/dist/adapter-gpb0ICA2-DPjB1dMR.mjs.map +1 -0
  6. package/dist/{adapter-xFPDhkod-BsdLsy9N.d.mts → adapter-xFPDhkod-Cio6up_5.d.mts} +3 -3
  7. package/dist/{adapter-xFPDhkod-BsdLsy9N.d.mts.map → adapter-xFPDhkod-Cio6up_5.d.mts.map} +1 -1
  8. package/dist/adapter.d.mts +11 -11
  9. package/dist/adapter.mjs +6 -6
  10. package/dist/adapter__adapter.d.mts +2 -2
  11. package/dist/adapter__adapter.mjs +2 -2
  12. package/dist/adapter__codec-types.d.mts +3 -3
  13. package/dist/adapter__column-types.d.mts +1 -1
  14. package/dist/adapter__column-types.mjs +1 -1
  15. package/dist/adapter__control.d.mts +3 -3
  16. package/dist/adapter__control.mjs +5 -5
  17. package/dist/adapter__control.mjs.map +1 -1
  18. package/dist/adapter__runtime.d.mts +1 -1
  19. package/dist/adapter__runtime.mjs +22 -13
  20. package/dist/adapter__runtime.mjs.map +1 -1
  21. package/dist/adapter__sql-renderer.d.mts +2 -2
  22. package/dist/adapter__sql-renderer.mjs +1 -1
  23. package/dist/adapter__types.d.mts +2 -2
  24. package/dist/{aggregates-CDMoiy_Z.d.mts → aggregates-Bee9csBL.d.mts} +6 -6
  25. package/dist/{aggregates-CDMoiy_Z.d.mts.map → aggregates-Bee9csBL.d.mts.map} +1 -1
  26. package/dist/{aggregates-D5fuFVMC.mjs → aggregates-DMvLJFlR.mjs} +9 -3
  27. package/dist/aggregates-DMvLJFlR.mjs.map +1 -0
  28. package/dist/codec-ids-9Fs9p6ST.d.mts +1 -0
  29. package/dist/codec-ids-BElbEYb_-CeWfv5bC.d.mts +21 -0
  30. package/dist/codec-ids-BElbEYb_-CeWfv5bC.d.mts.map +1 -0
  31. package/dist/codec-ids-BHBFCNsQ-C1Af_LGF.mjs +21 -0
  32. package/dist/codec-ids-BHBFCNsQ-C1Af_LGF.mjs.map +1 -0
  33. package/dist/codec-types-BQCSRfvR.d.mts +1 -0
  34. package/dist/{codec-types-COh75Bop-CUehAexc.d.mts → codec-types-CG5ZkqDU-DCx8ZvBg.d.mts} +10 -3
  35. package/dist/codec-types-CG5ZkqDU-DCx8ZvBg.d.mts.map +1 -0
  36. package/dist/codec-types-YpVaNlY0.d.mts +2 -0
  37. package/dist/{codecs-BJYruC-a-BKDGae3k.d.mts → codecs-BqOj4EKm-BaGeNd2m.d.mts} +127 -4
  38. package/dist/codecs-BqOj4EKm-BaGeNd2m.d.mts.map +1 -0
  39. package/dist/codecs-DzkRnjjE.d.mts +1 -0
  40. package/dist/{codecs-yZoH21Yj-lQXtGlEq.mjs → codecs-My4bmOU6-D4-b5qLd.mjs} +350 -22
  41. package/dist/codecs-My4bmOU6-D4-b5qLd.mjs.map +1 -0
  42. package/dist/{codecs-g-YI3BtK.mjs → codecs-R3kGRyq2.mjs} +2 -2
  43. package/dist/codecs-R3kGRyq2.mjs.map +1 -0
  44. package/dist/{column-types-Dxm0BpPv.d.mts → column-types-bTPNfz46.d.mts} +3 -3
  45. package/dist/{column-types-Dxm0BpPv.d.mts.map → column-types-bTPNfz46.d.mts.map} +1 -1
  46. package/dist/{column-types-DcbNOYVb.mjs → column-types-toYbR7mn.mjs} +2 -2
  47. package/dist/{column-types-DcbNOYVb.mjs.map → column-types-toYbR7mn.mjs.map} +1 -1
  48. package/dist/{contract-contributions-wweWdXMK-CN-d35Rj.mjs → contract-contributions-wweWdXMK-CwYZg4jC.mjs} +2 -2
  49. package/dist/{contract-contributions-wweWdXMK-CN-d35Rj.mjs.map → contract-contributions-wweWdXMK-CwYZg4jC.mjs.map} +1 -1
  50. package/dist/{contract-free-CYl1uzJ8.mjs → contract-free-BH73BZHy.mjs} +4 -4
  51. package/dist/{contract-free-CYl1uzJ8.mjs.map → contract-free-BH73BZHy.mjs.map} +1 -1
  52. package/dist/control-DGa_C2q6.d.mts +242 -0
  53. package/dist/control-DGa_C2q6.d.mts.map +1 -0
  54. package/dist/{control-VMpMSXk9.d.mts → control-DXzV_IVS.d.mts} +4 -4
  55. package/dist/{control-VMpMSXk9.d.mts.map → control-DXzV_IVS.d.mts.map} +1 -1
  56. package/dist/{data-type-entries-yQ-qYugg-C_NnX5WO.mjs → data-type-entries-Cp4hBeJB-DYer43by.mjs} +30 -3
  57. package/dist/data-type-entries-Cp4hBeJB-DYer43by.mjs.map +1 -0
  58. package/dist/{data-types-Dx3rHsbF.d.mts → data-types-CwpMoNK4.d.mts} +22 -2
  59. package/dist/data-types-CwpMoNK4.d.mts.map +1 -0
  60. package/dist/{data-types-coQrCWfS-yMCe4F52.mjs → data-types-DXMZNR8j-CWrJOA8C.mjs} +79 -4
  61. package/dist/data-types-DXMZNR8j-CWrJOA8C.mjs.map +1 -0
  62. package/dist/date-time-now-generators-T8JO6gR6-DBt5IyH5.mjs +64 -0
  63. package/dist/date-time-now-generators-T8JO6gR6-DBt5IyH5.mjs.map +1 -0
  64. package/dist/datetime-text-CbgLX4q3-BKp563Ja.mjs +32 -0
  65. package/dist/datetime-text-CbgLX4q3-BKp563Ja.mjs.map +1 -0
  66. package/dist/{ddl-BoTU7bCZ-CXNSFEtj.mjs → ddl-BvD-wVtg-BoEWa8CG.mjs} +3 -3
  67. package/dist/{ddl-BoTU7bCZ-CXNSFEtj.mjs.map → ddl-BvD-wVtg-BoEWa8CG.mjs.map} +1 -1
  68. package/dist/{default-normalizer-DGMXypHg-CPf7oyZA.mjs → default-normalizer-CsMhUEOe-CRieDElD.mjs} +23 -11
  69. package/dist/default-normalizer-CsMhUEOe-CRieDElD.mjs.map +1 -0
  70. package/dist/{default-normalizer-CkHy3JYk.d.mts → default-normalizer-CtNsZNRZ.d.mts} +3 -3
  71. package/dist/{default-normalizer-CkHy3JYk.d.mts.map → default-normalizer-CtNsZNRZ.d.mts.map} +1 -1
  72. package/dist/descriptor-meta-BwJWbIVt-B24ey04f.mjs +280 -0
  73. package/dist/descriptor-meta-BwJWbIVt-B24ey04f.mjs.map +1 -0
  74. package/dist/{descriptor-meta-DrNwC4vO-D7vuA6QK.mjs → descriptor-meta-DrNwC4vO-B9xeeDp9.mjs} +3 -3
  75. package/dist/{descriptor-meta-DrNwC4vO-D7vuA6QK.mjs.map → descriptor-meta-DrNwC4vO-B9xeeDp9.mjs.map} +1 -1
  76. package/dist/errors-D9vZNPSI-DoNmdfv7.mjs +105 -0
  77. package/dist/errors-D9vZNPSI-DoNmdfv7.mjs.map +1 -0
  78. package/dist/{migration-D0UlBTQw.mjs → migration-DYyfcQB_.mjs} +2 -2
  79. package/dist/{migration-D0UlBTQw.mjs.map → migration-DYyfcQB_.mjs.map} +1 -1
  80. package/dist/{op-factory-call-DADakw8V-yXzHuXlv.mjs → op-factory-call-BQYECylm-K7S_xgRS.mjs} +6 -6
  81. package/dist/{op-factory-call-DADakw8V-yXzHuXlv.mjs.map → op-factory-call-BQYECylm-K7S_xgRS.mjs.map} +1 -1
  82. package/dist/{pack-DqL_HWJX.d.mts → pack-CXW0_XyO.d.mts} +180 -11
  83. package/dist/{pack-DqL_HWJX.d.mts.map → pack-CXW0_XyO.d.mts.map} +1 -1
  84. package/dist/{planner-1zVd0jR2-mkF3bIWw.mjs → planner-DNwf8s8s-BoXZwpVs.mjs} +5 -5
  85. package/dist/{planner-1zVd0jR2-mkF3bIWw.mjs.map → planner-DNwf8s8s-BoXZwpVs.mjs.map} +1 -1
  86. package/dist/{planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs → planner-produced-sqlite-migration-Z9OWyjQn-DGMHz6I1.mjs} +4 -4
  87. package/dist/{planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs.map → planner-produced-sqlite-migration-Z9OWyjQn-DGMHz6I1.mjs.map} +1 -1
  88. package/dist/{render-ops-CwuscSzF-D3hoxOT_.mjs → render-ops-CJXrOY63-1y0nLsb8.mjs} +4 -4
  89. package/dist/{render-ops-CwuscSzF-D3hoxOT_.mjs.map → render-ops-CJXrOY63-1y0nLsb8.mjs.map} +1 -1
  90. package/dist/require-temporal-qbyZfPgl-DGJhYwmE.mjs +16 -0
  91. package/dist/require-temporal-qbyZfPgl-DGJhYwmE.mjs.map +1 -0
  92. package/dist/{runtime-YfPIbtO6.d.mts → runtime-BQKQH94p.d.mts} +2 -2
  93. package/dist/{runtime-YfPIbtO6.d.mts.map → runtime-BQKQH94p.d.mts.map} +1 -1
  94. package/dist/{runtime-CjIoI3sa.d.mts → runtime-ZsuC__oX.d.mts} +33 -2
  95. package/dist/runtime-ZsuC__oX.d.mts.map +1 -0
  96. package/dist/sql-renderer-CgY2Sghp.d.mts +1 -0
  97. package/dist/{sql-utils-XGT5Esi2-Zr2mqJf8.mjs → sql-utils-C9blmi9x-B90QedVA.mjs} +3 -3
  98. package/dist/{sql-utils-XGT5Esi2-Zr2mqJf8.mjs.map → sql-utils-C9blmi9x-B90QedVA.mjs.map} +1 -1
  99. package/dist/sqlite-contract-view-DJhc7pI7-Db5l4qrA.mjs +51 -0
  100. package/dist/sqlite-contract-view-DJhc7pI7-Db5l4qrA.mjs.map +1 -0
  101. package/dist/{sqlite-migration-BLyz5GQr-BMImgGTB.mjs → sqlite-migration-BxQ65pKq-C7siJGuR.mjs} +13 -10
  102. package/dist/sqlite-migration-BxQ65pKq-C7siJGuR.mjs.map +1 -0
  103. package/dist/{sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs → sqlite-unbound-database-Df3Wf5ZA-B1QemRgb.mjs} +5 -49
  104. package/dist/sqlite-unbound-database-Df3Wf5ZA-B1QemRgb.mjs.map +1 -0
  105. package/dist/target.d.mts +14 -13
  106. package/dist/target.mjs +22 -20
  107. package/dist/target__aggregates.d.mts +1 -1
  108. package/dist/target__aggregates.mjs +1 -1
  109. package/dist/target__codec-ids.d.mts +3 -3
  110. package/dist/target__codec-ids.mjs +2 -2
  111. package/dist/target__codec-types.d.mts +3 -3
  112. package/dist/target__codecs.d.mts +3 -3
  113. package/dist/target__codecs.mjs +4 -4
  114. package/dist/target__contract-free.mjs +2 -2
  115. package/dist/target__control.d.mts +2 -2
  116. package/dist/target__control.mjs +42 -36
  117. package/dist/target__control.mjs.map +1 -1
  118. package/dist/target__data-types.d.mts +2 -2
  119. package/dist/target__data-types.mjs +3 -3
  120. package/dist/target__default-normalizer.d.mts +1 -1
  121. package/dist/target__default-normalizer.mjs +1 -1
  122. package/dist/target__migration.mjs +2 -2
  123. package/dist/target__op-factory-call.mjs +1 -1
  124. package/dist/target__pack.d.mts +1 -1
  125. package/dist/target__pack.mjs +1 -1
  126. package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
  127. package/dist/target__planner.mjs +1 -1
  128. package/dist/target__render-ops.mjs +1 -1
  129. package/dist/target__runtime.d.mts +2 -2
  130. package/dist/target__runtime.mjs +3 -3
  131. package/dist/target__runtime.mjs.map +1 -1
  132. package/dist/target__sql-utils.mjs +1 -1
  133. package/dist/target__types.d.mts +2 -0
  134. package/dist/target__types.mjs +2 -0
  135. package/dist/types-COqCbSev.d.mts +56 -0
  136. package/dist/types-COqCbSev.d.mts.map +1 -0
  137. package/dist/{types-y5JlAv97.d.mts → types-DpDK9e9U.d.mts} +1 -1
  138. package/package.json +18 -12
  139. package/dist/adapter-Cff01Cgi-C19Fhc2M.mjs.map +0 -1
  140. package/dist/aggregates-D5fuFVMC.mjs.map +0 -1
  141. package/dist/codec-ids-CMbhYIsa.d.mts +0 -1
  142. package/dist/codec-ids-DuJYssXV-BPKbFNRL.d.mts +0 -14
  143. package/dist/codec-ids-DuJYssXV-BPKbFNRL.d.mts.map +0 -1
  144. package/dist/codec-ids-wgEvkCkg-WltuexMR.mjs +0 -14
  145. package/dist/codec-ids-wgEvkCkg-WltuexMR.mjs.map +0 -1
  146. package/dist/codec-types-COh75Bop-CUehAexc.d.mts.map +0 -1
  147. package/dist/codec-types-ELHfd82J.d.mts +0 -2
  148. package/dist/codec-types-PONhVn74.d.mts +0 -1
  149. package/dist/codecs-BJYruC-a-BKDGae3k.d.mts.map +0 -1
  150. package/dist/codecs-Dn0xoCuf.d.mts +0 -1
  151. package/dist/codecs-g-YI3BtK.mjs.map +0 -1
  152. package/dist/codecs-yZoH21Yj-lQXtGlEq.mjs.map +0 -1
  153. package/dist/control-jYLWcPv2.d.mts +0 -130
  154. package/dist/control-jYLWcPv2.d.mts.map +0 -1
  155. package/dist/data-type-entries-yQ-qYugg-C_NnX5WO.mjs.map +0 -1
  156. package/dist/data-types-Dx3rHsbF.d.mts.map +0 -1
  157. package/dist/data-types-coQrCWfS-yMCe4F52.mjs.map +0 -1
  158. package/dist/datetime-text-Bniwehv--BSQhnrdE.mjs +0 -9
  159. package/dist/datetime-text-Bniwehv--BSQhnrdE.mjs.map +0 -1
  160. package/dist/default-normalizer-DGMXypHg-CPf7oyZA.mjs.map +0 -1
  161. package/dist/descriptor-meta-BNuC8mOJ-BfS3KaDU.mjs +0 -105
  162. package/dist/descriptor-meta-BNuC8mOJ-BfS3KaDU.mjs.map +0 -1
  163. package/dist/descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs +0 -15
  164. package/dist/descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs.map +0 -1
  165. package/dist/errors-DnR-sMHS-D_gh214a.mjs +0 -38
  166. package/dist/errors-DnR-sMHS-D_gh214a.mjs.map +0 -1
  167. package/dist/runtime-CjIoI3sa.d.mts.map +0 -1
  168. package/dist/sql-renderer-brQ96quu.d.mts +0 -1
  169. package/dist/sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs.map +0 -1
  170. package/dist/sqlite-migration-BLyz5GQr-BMImgGTB.mjs.map +0 -1
@@ -1,130 +0,0 @@
1
- import { t as SqlitePlanTargetDetails } from "./planner-target-details-B-qtfkmj-DIGpv7YQ.mjs";
2
- import { SqlNamespaceBase, SqlNamespaceEntries, SqlNamespaceInput, StorageTable } from "@prisma/orm-family-sql/contract/types";
3
- import { SqlControlTargetDescriptor } from "@prisma/orm-family-sql/family/control";
4
- //#region ../../../3-targets/sqlite/1-target/dist/control.d.mts
5
- //#region src/core/migrations/control-target.d.ts
6
- declare const sqliteControlTargetDescriptor: SqlControlTargetDescriptor<'sqlite', SqlitePlanTargetDetails>;
7
- //#endregion
8
- //#region src/core/sqlite-unbound-database.d.ts
9
- type SqliteDatabaseInput = {
10
- readonly id: string;
11
- readonly entries: SqlNamespaceEntries;
12
- };
13
- /**
14
- * SQLite namespace concretion carrying table metadata under
15
- * `entries.table` and unqualified `qualifyTable()` emission for runtime
16
- * SQL rendering.
17
- */
18
- declare class SqliteDatabase extends SqlNamespaceBase {
19
- readonly kind: string;
20
- readonly id: string;
21
- readonly entries: SqlNamespaceEntries;
22
- constructor(input: SqliteDatabaseInput);
23
- get table(): Readonly<Record<string, StorageTable>>;
24
- qualifier(): string;
25
- qualifyTable(tableName: string): string;
26
- }
27
- /**
28
- * SQLite target `Namespace` concretion. SQLite has no schema or
29
- * database-namespacing concept at the SQL level — there is exactly one
30
- * effective namespace per connection, so the target ships a single
31
- * singleton bound to the framework's `UNBOUND_NAMESPACE_ID` slot.
32
- *
33
- * Qualifier emission elides the prefix entirely: rendered DDL and
34
- * queries look unqualified (`CREATE TABLE "users" (...)`), matching
35
- * SQLite's native dialect. Call sites stay polymorphic — they ask the
36
- * namespace for its qualifier and consume the empty/unqualified result
37
- * the same way Postgres consumes a `"schema"` prefix.
38
- *
39
- * The SQLite PSL interpreter rejects every explicit `namespace { … }`
40
- * block with a diagnostic naming SQLite; only the implicit
41
- * `__unspecified__` AST bucket reaches the SQLite interpreter, which
42
- * lowers it to this singleton.
43
- */
44
- declare class SqliteUnboundDatabase extends SqliteDatabase {
45
- static readonly instance: SqliteUnboundDatabase;
46
- private constructor();
47
- }
48
- /**
49
- * Target-supplied `Namespace` factory the SQLite target plumbs through
50
- * `defineContract({ createNamespace })`. SQLite has only one
51
- * effective namespace slot — the framework `UNBOUND_NAMESPACE_ID`
52
- * sentinel — so the factory always returns the singleton or a fresh
53
- * `SqliteDatabase` for the unbound slot with tables. The SQL family's
54
- * defensive validation in `defineContract` already rejects
55
- * user-declared SQLite namespaces, so this throw is a structural
56
- * safety net rather than a user-facing surface.
57
- */
58
- declare function sqliteCreateNamespace(input: SqlNamespaceInput): SqliteDatabase | SqliteUnboundDatabase;
59
- //#endregion
60
- //#region src/core/type-constructors.d.ts
61
- /**
62
- * The base PSL scalars as zero-arg type constructors in the unified authoring
63
- * channel. Each names a codec; the column's database type is its data type's.
64
- *
65
- * The type position is the only storage decider: a mutation-default generator
66
- * (`@onCreate(uuid())`) never re-picks a column's storage.
67
- *
68
- * The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.
69
- */
70
- declare const sqliteScalarTypeConstructors: {
71
- readonly String: {
72
- readonly kind: "typeConstructor";
73
- readonly documentation: "Variable-length text stored as SQLite text.";
74
- readonly output: {
75
- readonly codecId: "sqlite/text@1";
76
- };
77
- };
78
- readonly Int: {
79
- readonly kind: "typeConstructor";
80
- readonly documentation: "An integer stored as SQLite integer and represented as a JavaScript number.";
81
- readonly output: {
82
- readonly codecId: "sqlite/integer@1";
83
- };
84
- };
85
- readonly BigInt: {
86
- readonly kind: "typeConstructor";
87
- readonly documentation: "An integer stored as SQLite integer and represented as a JavaScript bigint.";
88
- readonly output: {
89
- readonly codecId: "sqlite/bigint@1";
90
- };
91
- };
92
- readonly Float: {
93
- readonly kind: "typeConstructor";
94
- readonly documentation: "A floating-point number stored as SQLite real.";
95
- readonly output: {
96
- readonly codecId: "sqlite/real@1";
97
- };
98
- };
99
- readonly Decimal: {
100
- readonly kind: "typeConstructor";
101
- readonly documentation: "A decimal value stored and represented as text to preserve precision.";
102
- readonly output: {
103
- readonly codecId: "sqlite/text@1";
104
- };
105
- };
106
- readonly DateTime: {
107
- readonly kind: "typeConstructor";
108
- readonly documentation: "A date and time stored as SQLite text.";
109
- readonly output: {
110
- readonly codecId: "sqlite/datetime@1";
111
- };
112
- };
113
- readonly Json: {
114
- readonly kind: "typeConstructor";
115
- readonly documentation: "A JSON value serialized to SQLite text.";
116
- readonly output: {
117
- readonly codecId: "sqlite/json@1";
118
- };
119
- };
120
- readonly Bytes: {
121
- readonly kind: "typeConstructor";
122
- readonly documentation: "Binary data stored as a SQLite blob.";
123
- readonly output: {
124
- readonly codecId: "sqlite/blob@1";
125
- };
126
- };
127
- };
128
- //#endregion
129
- export { sqliteScalarTypeConstructors as i, sqliteControlTargetDescriptor as n, sqliteCreateNamespace as r, SqliteUnboundDatabase as t };
130
- //# sourceMappingURL=control-jYLWcPv2.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"control-jYLWcPv2.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/control.d.mts"],"mappings":";;;;;cAIc,+BAA+B,qCAAqC;;;KAG7E;WACM;WACA,SAAS;;;;;;;cAON,uBAAuB;WAC1B;WACA;WACA,SAAS;EAClB,YAAY,OAAO;MACf,SAAS,SAAS,eAAe;EACrC;EACA,aAAa;;;;;;;;;;;;;;;;;;;cAmBD,8BAA8B;kBAC1B,UAAU;UAClB;;;;;;;;;;;;iBAYO,sBAAsB,OAAO,oBAAoB,iBAAiB;;;;;;;;;;;;cAYrE;WACH;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-type-entries-yQ-qYugg-C_NnX5WO.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/data-type-entries-yQ-qYugg.mjs"],"sourcesContent":["import { c as sqliteDatetimeText, d as sqliteReal, f as sqliteText, l as sqliteInteger, n as sqliteBlobFromHexText, s as sqliteDatetime, t as sqliteBlob, u as sqliteJson } from \"./data-types-coQrCWfS.mjs\";\nimport { createNumberClassifier, numeralText, parseJsonText, signedRange } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\n//#region src/core/data-type-entries.ts\nconst classifySqliteNumber = createNumberClassifier({\n\tintegers: [{\n\t\ttype: sqliteInteger.id,\n\t\tform: \"text\",\n\t\t...signedRange(64)\n\t}],\n\tfraction: {\n\t\ttype: sqliteReal.id,\n\t\tform: \"number\"\n\t},\n\twords: {\n\t\ttype: sqliteReal.id,\n\t\tform: \"text\"\n\t}\n});\nfunction printNumber(value) {\n\treturn typeof value === \"number\" ? numeralText(value) : String(value);\n}\nfunction sqliteDataTypeEntries() {\n\treturn {\n\t\t[sqliteText.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"string\",\n\t\t\t\tparse: (text) => text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Text.\"\n\t\t},\n\t\t[sqliteReal.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"number\",\n\t\t\t\ttypes: [sqliteInteger.id, sqliteReal.id],\n\t\t\t\tclassify: classifySqliteNumber\n\t\t\t},\n\t\t\tprint: printNumber,\n\t\t\tdocumentation: \"A number, whose type comes from its own size and precision.\"\n\t\t},\n\t\t[sqliteJson.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"json\",\n\t\t\t\tparse: (text) => canonicalizeJson(parseJsonText(text))\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Reads the text as a JSON document and stores its JSON text as the default value.\"\n\t\t},\n\t\t[sqliteBlob.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"blob\",\n\t\t\t\tparse: sqliteBlobFromHexText\n\t\t\t},\n\t\t\tprint: (value) => String(value).toLowerCase(),\n\t\t\tdocumentation: \"Bytes, written as hex text, two digits for each byte, as in blob`68656c6c6f`.\"\n\t\t},\n\t\t[sqliteDatetime.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"datetime\",\n\t\t\t\tparse: sqliteDatetimeText\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"An instant, as in datetime`2024-01-01T00:00:00Z`. Reads ISO 8601 with a UTC offset and stores the instant in UTC with three fraction digits, the text every row holds.\"\n\t\t}\n\t};\n}\n//#endregion\nexport { sqliteDataTypeEntries as t };\n\n//# sourceMappingURL=data-type-entries-yQ-qYugg.mjs.map"],"mappings":";;;;AAIA,MAAM,uBAAuB,uBAAuB;CACnD,UAAU,CAAC;EACV,MAAM,cAAc;EACpB,MAAM;EACN,GAAG,YAAY,EAAE;CAClB,CAAC;CACD,UAAU;EACT,MAAM,WAAW;EACjB,MAAM;CACP;CACA,OAAO;EACN,MAAM,WAAW;EACjB,MAAM;CACP;AACD,CAAC;AACD,SAAS,YAAY,OAAO;CAC3B,OAAO,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI,OAAO,KAAK;AACrE;AACA,SAAS,wBAAwB;CAChC,OAAO;GACL,WAAW,KAAK;GAChB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,QAAQ,SAAS;GAClB;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,WAAW,KAAK;GAChB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,OAAO,CAAC,cAAc,IAAI,WAAW,EAAE;IACvC,UAAU;GACX;GACA,OAAO;GACP,eAAe;EAChB;GACC,WAAW,KAAK;GAChB,SAAS;IACR,MAAM;IACN,KAAK;IACL,QAAQ,SAAS,iBAAiB,cAAc,IAAI,CAAC;GACtD;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,WAAW,KAAK;GAChB,SAAS;IACR,MAAM;IACN,KAAK;IACL,OAAO;GACR;GACA,QAAQ,UAAU,OAAO,KAAK,CAAC,CAAC,YAAY;GAC5C,eAAe;EAChB;GACC,eAAe,KAAK;GACpB,SAAS;IACR,MAAM;IACN,KAAK;IACL,OAAO;GACR;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;CACD;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-types-Dx3rHsbF.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/data-types.d.mts"],"mappings":";;;;iBAGiB,yBAAyB,SAAS,eAAe;;;cAGpD,uDAAuD,YAAY,SAAS;;cAE5E,0DAA0D,YAAY,SAAS;;cAE/E,uDAAuD,YAAY,SAAS;cAC5E,uDAAuD,YAAY,SAAS;;iBAEzE,sBAAsB;;cAEzB,2EAA2E;EACvF;;cAEY,4DAA4D;EACxE;;cAEY,mEAAmE;EAC/E;;;;;cAKY,qBAAqB;;cAErB,2DAA2D,YAAY,SAAS;;cAEhF,uDAAuD,YAAY,SAAS;;cAE5E,0BAA0B;;cAE1B,8BAA8B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-types-coQrCWfS-yMCe4F52.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/data-types-coQrCWfS.mjs"],"sourcesContent":["import { INT64_RANGE, castUnchanged, isoDateStringText, readJsonFloat, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue, refuseWrongShape } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { sqlDataType, sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\n//#region src/core/data-types.ts\n/** Digit text as `real` stores it: the nearest double, as SQLite converts an integer to a real. */\nconst asReal = (value) => typeof value === \"string\" ? Number(value) : refuseWrongShape(value, \"digit text\");\n/** A type written and reported by `name` and nothing else. */\nconst storedAs = (id, name, read, casts = {}) => sqlDataType(id, {\n\ttexts: [{\n\t\ttext: name,\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread,\n\tcasts\n});\nconst readText = (json) => readJsonString(\"sqlite/text\", json);\nconst UPPERCASE_HEX = /^(?:[0-9A-F]{2})*$/;\nconst sqliteText = storedAs(\"sqlite/text\", \"text\", readText);\n/** Digit text, which holds every 64-bit integer exactly; SQLite reads an INTEGER default back as a number. */\nconst sqliteInteger = sqlDataType(\"sqlite/integer\", {\n\ttexts: [{\n\t\ttext: \"integer\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread: (json) => {\n\t\treadJsonIntegerText(\"sqlite/integer\", json, INT64_RANGE);\n\t\treturn json;\n\t},\n\tcasts: {}\n});\n/** SQLite cannot store NaN, but a codec refuses it, as ADR 254 places that limit, so the type reads it. */\nconst sqliteReal = storedAs(\"sqlite/real\", \"real\", (json) => {\n\treadJsonFloat(\"sqlite/real\", json);\n\treturn json;\n}, { [sqliteInteger.id]: asReal });\nconst sqliteBlob = storedAs(\"sqlite/blob\", \"blob\", (json) => readJsonMatching(\"sqlite/blob\", json, UPPERCASE_HEX, \"uppercase hexadecimal text\"), {});\nconst HEX_TEXT = /^(?:[0-9A-Fa-f]{2})*$/;\n/** The upper-case hex `sqlite/blob` stores for the hex text a `blob` tag holds, `68656c6c6f`. */\nfunction sqliteBlobFromHexText(text) {\n\tif (!HEX_TEXT.test(text)) throw structuredError(\"CONTRACT.CAST_REFUSED\", `\"${text}\" is not hex text: write two hexadecimal digits for each byte, as in blob\\`68656c6c6f\\`.`, {\n\t\twhy: \"The blob tag reads bytes as hex text, two digits for each byte.\",\n\t\tfix: \"Write the bytes in hex, as in blob`68656c6c6f`.\"\n\t});\n\treturn text.toUpperCase();\n}\n/** The length of `character` and `character varying`, which SQLite accepts and does not enforce, up to SQLite's largest string length, so a double holds every accepted length exactly. */\nconst sqliteCharacterLengthParams = type({ \"length?\": `number.integer >= 1 & number.integer <= 2147483647` });\n/** A character type is written without its length, so its normal form has none. */\nconst withoutLength = ({ length: _length, ...rest }) => rest;\nconst sqliteCharacter = sqlDataType(\"sqlite/character\", {\n\tparams: sqliteCharacterLengthParams,\n\ttexts: [{\n\t\ttext: \"character\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread: (json) => readJsonString(\"sqlite/character\", json),\n\tnormalize: withoutLength,\n\tcasts: { [sqliteText.id]: castUnchanged }\n});\nconst sqliteCharacterVarying = sqlDataType(\"sqlite/character-varying\", {\n\tparams: sqliteCharacterLengthParams,\n\ttexts: [{\n\t\ttext: \"character varying\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread: (json) => readJsonString(\"sqlite/character-varying\", json),\n\tnormalize: withoutLength,\n\tcasts: { [sqliteText.id]: castUnchanged }\n});\n/**\n* The value of `sqlite/datetime` (ADR 254): the text `toISOString()` writes for every row. The range and the millisecond precision are those of a JavaScript `Date`, the codec's value.\n*/\nconst sqliteDatetimeText = (text) => isoDateStringText(text, \"sqlite/datetime\");\n/** What `sqliteDatetimeText` writes for `text`, or `undefined` when it names no instant the type holds. */\nfunction storedDatetime(text) {\n\ttry {\n\t\treturn sqliteDatetimeText(text);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Reads an instant in any spelling the `datetime` tag reads; `spellDatetime` gives it the one it stores. */\nconst readDatetime = (json) => typeof json === \"string\" && storedDatetime(json) !== void 0 ? json : refuseJsonValue(\"sqlite/datetime\", \"ISO 8601 date and time text with a UTC offset and at most three fraction digits, as in \\\"2024-01-01T00:00:00Z\\\"\", json);\n/** An instant is stored in UTC with three fraction digits. */\nconst spellDatetime = (json) => typeof json === \"string\" ? storedDatetime(json) ?? json : json;\n/** The document JSON text holds, or `undefined` when the text is not JSON. */\nfunction documentOf(text) {\n\ttry {\n\t\treturn { value: JSON.parse(text) };\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Reads the JSON text of a document, in any spelling; `spellJson` gives it the one it stores. */\nconst readJson = (json) => typeof json === \"string\" && documentOf(json) !== void 0 ? json : refuseJsonValue(\"sqlite/json\", \"the JSON text of a document\", json);\n/** A document is stored as its JSON text with sorted keys and no added whitespace. */\nconst spellJson = (json) => {\n\tconst document = typeof json === \"string\" ? documentOf(json) : void 0;\n\treturn document === void 0 ? json : canonicalizeJson(document.value);\n};\n/** An instant, stored as text in the form `toISOString()` writes. */\nconst sqliteDatetime = sqlDataType(\"sqlite/datetime\", {\n\tstoredAs: sqliteText.id,\n\tread: readDatetime,\n\tspell: spellDatetime\n});\n/** A JSON document, stored as its JSON text with sorted keys and no added whitespace. A column declared `JSON` would have numeric affinity and store the document `\"42\"` as the integer 42. */\nconst sqliteJson = sqlDataType(\"sqlite/json\", {\n\tstoredAs: sqliteText.id,\n\tread: readJson,\n\tspell: spellJson\n});\n/** Every data type this target registers. */\nconst sqliteDataTypes = [\n\tsqliteText,\n\tsqliteInteger,\n\tsqliteReal,\n\tsqliteBlob,\n\tsqliteCharacter,\n\tsqliteCharacterVarying,\n\tsqliteDatetime,\n\tsqliteJson,\n\tsqlRawDataType\n];\n/** SQLite's text data types: `text`, `character(n)` and `character varying(n)`. */\nconst sqliteTextDataTypes = [\n\tsqliteText.id,\n\tsqliteCharacter.id,\n\tsqliteCharacterVarying.id\n];\n//#endregion\nexport { sqliteCharacterVarying as a, sqliteDatetimeText as c, sqliteReal as d, sqliteText as f, sqliteCharacterLengthParams as i, sqliteInteger as l, sqliteBlobFromHexText as n, sqliteDataTypes as o, sqliteTextDataTypes as p, sqliteCharacter as r, sqliteDatetime as s, sqliteBlob as t, sqliteJson as u };\n\n//# sourceMappingURL=data-types-coQrCWfS.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,UAAU,UAAU,OA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 @@
1
- //#region ../../../3-targets/sqlite/1-target/dist/datetime-text-Bniwehv-.mjs
2
- /** The `strftime` format for the text `encodeSqliteDatetime` writes. */
3
- const SQLITE_DATETIME_TEXT_FORMAT = "%Y-%m-%dT%H:%M:%fZ";
4
- /** The SQLite expression for the current instant, as the text `encodeSqliteDatetime` writes. */
5
- const SQLITE_NOW_EXPRESSION = `strftime('${SQLITE_DATETIME_TEXT_FORMAT}','now')`;
6
- //#endregion
7
- export { SQLITE_NOW_EXPRESSION as n, SQLITE_DATETIME_TEXT_FORMAT as t };
8
-
9
- //# sourceMappingURL=datetime-text-Bniwehv--BSQhnrdE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datetime-text-Bniwehv--BSQhnrdE.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/datetime-text-Bniwehv-.mjs"],"sourcesContent":["//#region src/core/datetime-text.ts\n/** The `strftime` format for the text `encodeSqliteDatetime` writes. */\nconst SQLITE_DATETIME_TEXT_FORMAT = \"%Y-%m-%dT%H:%M:%fZ\";\n/** The SQLite expression for the current instant, as the text `encodeSqliteDatetime` writes. */\nconst SQLITE_NOW_EXPRESSION = `strftime('${SQLITE_DATETIME_TEXT_FORMAT}','now')`;\n//#endregion\nexport { SQLITE_NOW_EXPRESSION as n, SQLITE_DATETIME_TEXT_FORMAT as t };\n\n//# sourceMappingURL=datetime-text-Bniwehv-.mjs.map"],"mappings":";;AAEA,MAAM,8BAA8B;;AAEpC,MAAM,wBAAwB,aAAa,4BAA4B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-normalizer-DGMXypHg-CPf7oyZA.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/default-normalizer-DGMXypHg.mjs"],"sourcesContent":["import { t as SQLITE_DATETIME_TEXT_FORMAT } from \"./datetime-text-Bniwehv-.mjs\";\n//#region src/core/default-normalizer.ts\nconst NULL_PATTERN = /^NULL$/i;\nconst INTEGER_PATTERN = /^[+-]?\\d+$/;\nconst REAL_PATTERN = /^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?$/;\nconst STRING_LITERAL_PATTERN = /^'((?:[^']|'')*)'$/;\nconst STRFTIME_NOW_PATTERN = /^strftime\\s*\\(\\s*(['\"])([^'\"]*)\\1\\s*,\\s*(['\"])now\\3\\s*\\)$/i;\nfunction isCurrentTimestamp(expression) {\n\tconst lower = expression.toLowerCase();\n\tif (lower === \"current_timestamp\" || lower === \"datetime('now')\" || lower === \"datetime(\\\"now\\\")\") return true;\n\treturn expression.match(STRFTIME_NOW_PATTERN)?.[2] === SQLITE_DATETIME_TEXT_FORMAT;\n}\n/**\n* Strips a single matched wrapping pair of outer parens from `s`. Conservative:\n* only strips when the leading `(` is matched by the trailing `)` (so\n* `(a) + (b)` is returned unchanged). Mirrors SQLite's own\n* `pragma_table_info.dflt_value` normalization for expression defaults, and\n* is shared with the recreate-table postcheck builder so both sides agree\n* on the text.\n*/\nfunction stripOuterParens(s) {\n\tif (!s.startsWith(\"(\") || !s.endsWith(\")\")) return s;\n\tlet depth = 0;\n\tfor (let i = 0; i < s.length; i++) if (s[i] === \"(\") depth += 1;\n\telse if (s[i] === \")\") {\n\t\tdepth -= 1;\n\t\tif (depth === 0 && i < s.length - 1) return s;\n\t}\n\treturn s.slice(1, -1);\n}\n/** The type affinity SQLite gives a column of `declaredType`, by its rules in order. */\nfunction affinityOf(declaredType) {\n\tconst upper = declaredType.toUpperCase();\n\tif (upper.includes(\"INT\")) return \"integer\";\n\tif (upper.includes(\"CHAR\") || upper.includes(\"CLOB\") || upper.includes(\"TEXT\")) return \"text\";\n\tif (upper.includes(\"BLOB\") || upper.trim() === \"\") return \"blob\";\n\tif (upper.includes(\"REAL\") || upper.includes(\"FLOA\") || upper.includes(\"DOUB\")) return \"real\";\n\treturn \"numeric\";\n}\n/** A numeral as the driver returns it: a number, or digit text for an integer no double holds exactly. */\nfunction numberBody(numeral) {\n\tif (INTEGER_PATTERN.test(numeral)) {\n\t\tconst integer = BigInt(numeral);\n\t\treturn Number.isSafeInteger(Number(integer)) ? Number(integer) : integer.toString();\n\t}\n\treturn Number(numeral);\n}\n/** What the column stores for a literal written as `text` (quoted) or as a numeral, by its affinity. */\nfunction bodyFor(literal, quoted, affinity) {\n\tconst numeral = INTEGER_PATTERN.test(literal) || REAL_PATTERN.test(literal);\n\tif (affinity === \"text\") return literal;\n\tif (affinity === \"blob\") return quoted || !numeral ? literal : numberBody(literal);\n\treturn numeral ? numberBody(literal) : literal;\n}\n/** A blob literal: `X'` or `x'`, an even number of hexadecimal digits, `'`. */\nconst BLOB_LITERAL_PATTERN = /^[xX]'((?:[0-9a-fA-F]{2})*)'$/;\n/**\n* Reads a column's reported default. `CURRENT_TIMESTAMP`, `datetime('now')` and the expression a `now()` default is written as are `now()`. A quoted string, a numeral or a blob literal (`X'6869'`, read as its bytes) is a literal; any other expression is a function default, kept as reported.\n*/\nfunction readSqliteDefault(rawDefault, declaredType) {\n\tlet trimmed = rawDefault.trim();\n\twhile (true) {\n\t\tconst stripped = stripOuterParens(trimmed).trim();\n\t\tif (stripped === trimmed) break;\n\t\ttrimmed = stripped;\n\t}\n\tif (isCurrentTimestamp(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"now()\"\n\t};\n\tif (NULL_PATTERN.test(trimmed)) return { kind: \"null\" };\n\tconst affinity = affinityOf(declaredType);\n\tconst quoted = STRING_LITERAL_PATTERN.exec(trimmed)?.[1];\n\tif (quoted !== void 0) return {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody: bodyFor(quoted.replace(/''/g, \"'\"), true, affinity)\n\t\t}\n\t};\n\tconst blobHex = BLOB_LITERAL_PATTERN.exec(trimmed)?.[1];\n\tif (blobHex !== void 0) return {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody: new Uint8Array(Buffer.from(blobHex, \"hex\"))\n\t\t}\n\t};\n\tif (INTEGER_PATTERN.test(trimmed) || REAL_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody: bodyFor(trimmed, false, affinity)\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t};\n}\n/**\n* Names a contract's expression default the way {@link readSqliteDefault} names the same function in the database, so `` sql`CURRENT_TIMESTAMP` `` and the database's `datetime('now')` compare equal. A literal default, and an expression that writes a literal, pass through unchanged; introspection reads the latter's literal with the column's codec, and the diff compares the values.\n*/\nfunction sqliteResolveDefault(def, column) {\n\tif (def.kind !== \"function\") return def;\n\tconst read = readSqliteDefault(def.expression, column.typeText);\n\treturn read.kind === \"function\" ? read : def;\n}\n//#endregion\nexport { sqliteResolveDefault as n, stripOuterParens as r, readSqliteDefault as t };\n\n//# sourceMappingURL=default-normalizer-DGMXypHg.mjs.map"],"mappings":";;AAEA,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,eAAe;AACrB,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAC7B,SAAS,mBAAmB,YAAY;CACvC,MAAM,QAAQ,WAAW,YAAY;CACrC,IAAI,UAAU,uBAAuB,UAAU,qBAAqB,UAAU,qBAAqB,OAAO;CAC1G,OAAO,WAAW,MAAM,oBAAoB,CAAC,GAAG,OAAO;AACxD;;;;;;;;;AASA,SAAS,iBAAiB,GAAG;CAC5B,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,EAAE,SAAS,GAAG,GAAG,OAAO;CACnD,IAAI,QAAQ;CACZ,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK,IAAI,EAAE,OAAO,KAAK,SAAS;MACzD,IAAI,EAAE,OAAO,KAAK;EACtB,SAAS;EACT,IAAI,UAAU,KAAK,IAAI,EAAE,SAAS,GAAG,OAAO;CAC7C;CACA,OAAO,EAAE,MAAM,GAAG,EAAE;AACrB;;AAEA,SAAS,WA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,GAAG,OAAO;EAC7B,MAAM;EACN,SAAS;GACR,MAAM;GACN,MAAM,QAAQ,OAAO,QAAQ,OAAO,GAAG,GAAG,MAAM,QAAQ;EACzD;CACD;CACA,MAAM,UAAU,qBAAqB,KAAK,OAAO,CAAC,GAAG;CACrD,IAAI,YAAY,KAAK,GAAG,OAAO;EAC9B,MAAM;EACN,SAAS;GACR,MAAM;GACN,MAAM,IAAI,WAAW,OAAO,KAAK,SAAS,KAAK,CAAC;EACjD;CACD;CACA,IAAI,gBAAgB,KAAK,OAAO,KAAK,aAAa,KAAK,OAAO,GAAG,OAAO;EACvE,MAAM;EACN,SAAS;GACR,MAAM;GACN,MAAM,QAAQ,SAAS,OAAO,QAAQ;EACvC;CACD;CACA,OAAO;EACN,MAAM;EACN,YAAY;CACb;AACD;;;;AAIA,SAAS,qBAAqB,KAAK,QAAQ;CAC1C,IAAI,IAAI,SAAS,YAAY,OAAO;CACpC,MAAM,OAAO,kBAAkB,IAAI,YAAY,OAAO,QAAQ;CAC9D,OAAO,KAAK,SAAS,aAAa,OAAO;AAC1C"}
@@ -1,105 +0,0 @@
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-WltuexMR.mjs";
2
- import { l as sqliteInteger, p as sqliteTextDataTypes } from "./data-types-coQrCWfS-yMCe4F52.mjs";
3
- import { t as sqliteDataTypeEntries } from "./data-type-entries-yQ-qYugg-C_NnX5WO.mjs";
4
- import { t as sqliteTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs";
5
- import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
6
- import { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors } from "@prisma/orm-family-sql/family/pack";
7
- import { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from "@prisma/orm-framework/components/authoring";
8
- import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
9
- //#region ../../../3-targets/sqlite/1-target/dist/descriptor-meta-BNuC8mOJ.mjs
10
- const sqliteAuthoringTypes = {
11
- .../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: "sqlite/real" }),
12
- BigIntNumber: {
13
- kind: "typeConstructor",
14
- documentation: "A SQLite integer represented as a JavaScript number within its safe integer range.",
15
- output: { codecId: "sqlite/bigintnumber@1" }
16
- },
17
- temporal: /* @__PURE__ */ temporalTypeAliases({ codecId: "sqlite/datetime@1" }, "a JavaScript Date")
18
- };
19
- const sqliteGeneratorFunctions = [
20
- ...sqlIntegerArgumentGeneratorFunctions({ integer: sqliteInteger.id }),
21
- {
22
- name: "now",
23
- bindings: [singleGeneratorBinding({
24
- codecIds: [SQLITE_DATETIME_CODEC_ID],
25
- generatorId: TIMESTAMP_NOW_GENERATOR_ID
26
- })]
27
- },
28
- ...idGeneratorFunctionBindings({ text: [SQLITE_TEXT_CODEC_ID] })
29
- ];
30
- /** The `now` generator SQLite binds. The SQL family registers the identifier generators. */
31
- const sqliteGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }];
32
- /**
33
- * The base PSL scalars as zero-arg type constructors in the unified authoring
34
- * channel. Each names a codec; the column's database type is its data type's.
35
- *
36
- * The type position is the only storage decider: a mutation-default generator
37
- * (`@onCreate(uuid())`) never re-picks a column's storage.
38
- *
39
- * The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.
40
- */
41
- const sqliteScalarTypeConstructors = {
42
- String: {
43
- kind: "typeConstructor",
44
- documentation: "Variable-length text stored as SQLite text.",
45
- output: { codecId: SQLITE_TEXT_CODEC_ID }
46
- },
47
- Int: {
48
- kind: "typeConstructor",
49
- documentation: "An integer stored as SQLite integer and represented as a JavaScript number.",
50
- output: { codecId: SQLITE_INTEGER_CODEC_ID }
51
- },
52
- BigInt: {
53
- kind: "typeConstructor",
54
- documentation: "An integer stored as SQLite integer and represented as a JavaScript bigint.",
55
- output: { codecId: SQLITE_BIGINT_CODEC_ID }
56
- },
57
- Float: {
58
- kind: "typeConstructor",
59
- documentation: "A floating-point number stored as SQLite real.",
60
- output: { codecId: SQLITE_REAL_CODEC_ID }
61
- },
62
- Decimal: {
63
- kind: "typeConstructor",
64
- documentation: "A decimal value stored and represented as text to preserve precision.",
65
- output: { codecId: SQLITE_TEXT_CODEC_ID }
66
- },
67
- DateTime: {
68
- kind: "typeConstructor",
69
- documentation: "A date and time stored as SQLite text.",
70
- output: { codecId: SQLITE_DATETIME_CODEC_ID }
71
- },
72
- Json: {
73
- kind: "typeConstructor",
74
- documentation: "A JSON value serialized to SQLite text.",
75
- output: { codecId: SQLITE_JSON_CODEC_ID }
76
- },
77
- Bytes: {
78
- kind: "typeConstructor",
79
- documentation: "Binary data stored as a SQLite blob.",
80
- output: { codecId: SQLITE_BLOB_CODEC_ID }
81
- }
82
- };
83
- const sqliteTargetDescriptorMeta = {
84
- ...sqliteTargetDescriptorMetaRuntime,
85
- defaultNamespaceId: UNBOUND_NAMESPACE_ID,
86
- supportsNamespaces: false,
87
- displayName: "SQLite",
88
- authoring: {
89
- type: {
90
- ...sqliteScalarTypeConstructors,
91
- ...sqliteAuthoringTypes
92
- },
93
- dataTypes: sqliteDataTypeEntries(),
94
- textDataTypes: sqliteTextDataTypes
95
- },
96
- generatorFunctions: sqliteGeneratorFunctions,
97
- controlMutationDefaults: {
98
- defaultFunctionRegistry: /* @__PURE__ */ new Map(),
99
- generatorDescriptors: sqliteGeneratorDescriptors
100
- }
101
- };
102
- //#endregion
103
- export { sqliteTargetDescriptorMeta as n, sqliteScalarTypeConstructors as t };
104
-
105
- //# sourceMappingURL=descriptor-meta-BNuC8mOJ-BfS3KaDU.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptor-meta-BNuC8mOJ-BfS3KaDU.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/descriptor-meta-BNuC8mOJ.mjs"],"sourcesContent":["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.mjs\";\nimport { l as sqliteInteger, p as sqliteTextDataTypes } from \"./data-types-coQrCWfS.mjs\";\nimport { t as sqliteDataTypeEntries } from \"./data-type-entries-yQ-qYugg.mjs\";\nimport { t as sqliteTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-DX2JfHWF.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors } from \"@internal/family-sql/pack\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\n//#region src/core/authoring.ts\nconst sqliteAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: \"sqlite/real\" }),\n\tBigIntNumber: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A SQLite integer represented as a JavaScript number within its safe integer range.\",\n\t\toutput: { codecId: \"sqlite/bigintnumber@1\" }\n\t},\n\ttemporal: /* @__PURE__ */ temporalTypeAliases({ codecId: \"sqlite/datetime@1\" }, \"a JavaScript Date\")\n};\n//#endregion\n//#region src/core/generator-functions.ts\nconst sqliteGeneratorFunctions = [\n\t...sqlIntegerArgumentGeneratorFunctions({ integer: sqliteInteger.id }),\n\t{\n\t\tname: \"now\",\n\t\tbindings: [singleGeneratorBinding({\n\t\t\tcodecIds: [SQLITE_DATETIME_CODEC_ID],\n\t\t\tgeneratorId: TIMESTAMP_NOW_GENERATOR_ID\n\t\t})]\n\t},\n\t...idGeneratorFunctionBindings({ text: [SQLITE_TEXT_CODEC_ID] })\n];\n/** The `now` generator SQLite binds. The SQL family registers the identifier generators. */\nconst sqliteGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }];\n//#endregion\n//#region src/core/type-constructors.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring\n* channel. Each names a codec; the column's database type is its data type's.\n*\n* The type position is the only storage decider: a mutation-default generator\n* (`@onCreate(uuid())`) never re-picks a column's storage.\n*\n* The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst sqliteScalarTypeConstructors = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript number.\",\n\t\toutput: { codecId: SQLITE_INTEGER_CODEC_ID }\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: SQLITE_BIGINT_CODEC_ID }\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A floating-point number stored as SQLite real.\",\n\t\toutput: { codecId: SQLITE_REAL_CODEC_ID }\n\t},\n\tDecimal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A decimal value stored and represented as text to preserve precision.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_DATETIME_CODEC_ID }\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value serialized to SQLite text.\",\n\t\toutput: { codecId: SQLITE_JSON_CODEC_ID }\n\t},\n\tBytes: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Binary data stored as a SQLite blob.\",\n\t\toutput: { codecId: SQLITE_BLOB_CODEC_ID }\n\t}\n};\nconst sqliteTargetDescriptorMeta = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tdisplayName: \"SQLite\",\n\tauthoring: {\n\t\ttype: {\n\t\t\t...sqliteScalarTypeConstructors,\n\t\t\t...sqliteAuthoringTypes\n\t\t},\n\t\tdataTypes: sqliteDataTypeEntries(),\n\t\ttextDataTypes: sqliteTextDataTypes\n\t},\n\tgeneratorFunctions: sqliteGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: sqliteGeneratorDescriptors\n\t}\n};\n//#endregion\nexport { sqliteScalarTypeConstructors as n, sqliteTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-BNuC8mOJ.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,uBAAuB;CAC5B,GAAmB,0CAA0B,EAAE,UAAU,cAAc,CAAC;CACxE,cAAc;EACb,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,wBAAwB;CAC5C;CACA,UAA0B,oCAAoB,EAAE,SAAS,oBAAoB,GAAG,mBAAmB;AACpG;AAGA,MAAM,2BAA2B;CAChC,GAAG,qCAAqC,EAAE,SAAS,cAAc,GAAG,CAAC;CACrE;EACC,MAAM;EACN,UAAU,CAAC,uBAAuB;GACjC,UAAU,CAAC,wBAAwB;GACnC,aAAa;EACd,CAAC,CAAC;CACH;CACA,GAAG,4BAA4B,EAAE,MAAM,CAAC,oBAAoB,EAAE,CAAC;AAChE;;AAEA,MAAM,6BAA6B,CAAC,EAAE,IAAI,2BAA2B,CAAC;;;;;;;;;;AAYtE,MAAM,+BAA+B;CACpC,QAAQ;EACP,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,KAAK;EACJ,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,wBAAwB;CAC5C;CACA,QAAQ;EACP,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,uBAAuB;CAC3C;CACA,OAAO;EACN,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,SAAS;EACR,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,UAAU;EACT,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,yBAAyB;CAC7C;CACA,MAAM;EACL,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,OAAO;EACN,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;AACD;AACA,MAAM,6BAA6B;CAClC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,aAAa;CACb,WAAW;EACV,MAAM;GACL,GAAG;GACH,GAAG;EACJ;EACA,WAAW,sBAAsB;EACjC,eAAe;CAChB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;AACD"}
@@ -1,15 +0,0 @@
1
- import { o as sqliteDataTypes } from "./data-types-coQrCWfS-yMCe4F52.mjs";
2
- //#region ../../../3-targets/sqlite/1-target/dist/descriptor-meta-runtime-DX2JfHWF.mjs
3
- const sqliteTargetDescriptorMetaRuntime = {
4
- kind: "target",
5
- familyId: "sql",
6
- targetId: "sqlite",
7
- id: "sqlite",
8
- version: "0.0.1",
9
- capabilities: {},
10
- dataTypes: sqliteDataTypes
11
- };
12
- //#endregion
13
- export { sqliteTargetDescriptorMetaRuntime as t };
14
-
15
- //# sourceMappingURL=descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/descriptor-meta-runtime-DX2JfHWF.mjs"],"sourcesContent":["import { o as sqliteDataTypes } from \"./data-types-coQrCWfS.mjs\";\nconst sqliteTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: sqliteDataTypes\n};\n//#endregion\nexport { sqliteTargetDescriptorMetaRuntime as t };\n\n//# sourceMappingURL=descriptor-meta-runtime-DX2JfHWF.mjs.map"],"mappings":";;AACA,MAAM,oCAAoC;CACzC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;AACZ"}
@@ -1,38 +0,0 @@
1
- import { structuredError } from "@prisma/orm-framework/utils/structured-error";
2
- import { CliStructuredError } from "@prisma/orm-framework/errors/control";
3
- //#region ../../../3-targets/sqlite/1-target/dist/errors-DnR-sMHS.mjs
4
- function sqliteError(code, message, options) {
5
- return structuredError(code, message, options);
6
- }
7
- /**
8
- * A `SqliteMigration` operation that needs the materialized control adapter
9
- * — named by `operation` (e.g. `createTable`, `dropColumn`, `recreateTable`) —
10
- * was invoked, but the migration was constructed without a `ControlStack`.
11
- * Concrete authoring usage always goes through the migration CLI entrypoint,
12
- * which assembles a stack from the loaded `prisma.config.ts`; reaching this
13
- * error means a test fixture or ad-hoc consumer instantiated `SqliteMigration`
14
- * with the no-arg form (legal for `operations` / `describe` introspection only).
15
- *
16
- * The `operation` argument is required so every throw site names the operation
17
- * that actually failed; a new operation cannot inherit a misattributed message.
18
- *
19
- * Distinct from `MIGRATION.UNFILLED_PLACEHOLDER` (placeholder not filled)
20
- * because the missing input is the stack itself, not the per-operation
21
- * contract.
22
- *
23
- * Lives in `@internal/target-sqlite/errors` rather than the shared
24
- * framework migration errors module because the failure is target-specific:
25
- * the contract it talks about (`SqliteMigration`, the SQLite control
26
- * adapter, the SQLite-target stack) only exists in this package.
27
- */
28
- function errorSqliteMigrationStackMissing(operation) {
29
- return new CliStructuredError("MIGRATION.SQLITE_CONTROL_STACK_MISSING", `SqliteMigration.${operation} requires a control adapter`, {
30
- why: `SqliteMigration.${operation} was invoked on an instance constructed without a ControlStack, so the stored controlAdapter is undefined and the operation cannot lower its DDL node.`,
31
- fix: "Construct the migration via the migration CLI entrypoint (which assembles a ControlStack from the loaded prisma.config.ts), or pass a ControlStack containing a SQLite adapter to the migration constructor in test fixtures.",
32
- meta: { operation }
33
- });
34
- }
35
- //#endregion
36
- export { sqliteError as n, errorSqliteMigrationStackMissing as t };
37
-
38
- //# sourceMappingURL=errors-DnR-sMHS-D_gh214a.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors-DnR-sMHS-D_gh214a.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/errors-DnR-sMHS.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\nimport { CliStructuredError } from \"@internal/errors/control\";\n//#region src/core/errors.ts\nfunction sqliteError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n/**\n* A `SqliteMigration` operation that needs the materialized control adapter\n* — named by `operation` (e.g. `createTable`, `dropColumn`, `recreateTable`) —\n* was invoked, but the migration was constructed without a `ControlStack`.\n* Concrete authoring usage always goes through the migration CLI entrypoint,\n* which assembles a stack from the loaded `prisma.config.ts`; reaching this\n* error means a test fixture or ad-hoc consumer instantiated `SqliteMigration`\n* with the no-arg form (legal for `operations` / `describe` introspection only).\n*\n* The `operation` argument is required so every throw site names the operation\n* that actually failed; a new operation cannot inherit a misattributed message.\n*\n* Distinct from `MIGRATION.UNFILLED_PLACEHOLDER` (placeholder not filled)\n* because the missing input is the stack itself, not the per-operation\n* contract.\n*\n* Lives in `@internal/target-sqlite/errors` rather than the shared\n* framework migration errors module because the failure is target-specific:\n* the contract it talks about (`SqliteMigration`, the SQLite control\n* adapter, the SQLite-target stack) only exists in this package.\n*/\nfunction errorSqliteMigrationStackMissing(operation) {\n\treturn new CliStructuredError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `SqliteMigration.${operation} requires a control adapter`, {\n\t\twhy: `SqliteMigration.${operation} was invoked on an instance constructed without a ControlStack, so the stored controlAdapter is undefined and the operation cannot lower its DDL node.`,\n\t\tfix: \"Construct the migration via the migration CLI entrypoint (which assembles a ControlStack from the loaded prisma.config.ts), or pass a ControlStack containing a SQLite adapter to the migration constructor in test fixtures.\",\n\t\tmeta: { operation }\n\t});\n}\n//#endregion\nexport { sqliteError as n, errorSqliteMigrationStackMissing as t };\n\n//# sourceMappingURL=errors-DnR-sMHS.mjs.map"],"mappings":";;;AAGA,SAAS,YAAY,MAAM,SAAS,SAAS;CAC5C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,iCAAiC,WAAW;CACpD,OAAO,IAAI,mBAAmB,0CAA0C,mBAAmB,UAAU,8BAA8B;EAClI,KAAK,mBAAmB,UAAU;EAClC,KAAK;EACL,MAAM,EAAE,UAAU;CACnB,CAAC;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-CjIoI3sa.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/runtime.d.mts"],"mappings":";;;;;;;;;;UASU,oCAAoC;cAChC,+BAA+B,qCAAqC;;;;;;;;;cASpE,iCAAiC,0BAA0B,SAAS;EAChF;YACU,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc"}
@@ -1 +0,0 @@
1
- import "./adapter-xFPDhkod-BsdLsy9N.mjs";
@@ -1 +0,0 @@
1
- {"version":3,"file":"sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/sqlite-contract-view-CGfiGvKH.mjs"],"sourcesContent":["import { o as sqliteDataTypes } from \"./data-types-coQrCWfS.mjs\";\nimport { n as sqliteError } from \"./errors-DnR-sMHS.mjs\";\nimport { r as quoteIdentifier } from \"./sql-utils-XGT5Esi2.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { SqlNamespaceBase } from \"@internal/sql-contract/types\";\nimport { UNBOUND_NAMESPACE_ID, freezeNode, hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { SqlContractSerializerBase } from \"@internal/family-sql/ir\";\nimport { tableEntityKind } from \"@internal/sql-contract/entity-kinds\";\nimport { buildSqlSingleNamespaceView } from \"@internal/sql-contract/contract-view\";\n//#region src/core/sqlite-unbound-database.ts\nconst SQLITE_NAMESPACE_KIND = \"sqlite-namespace\";\n/**\n* SQLite namespace concretion carrying table metadata under\n* `entries.table` and unqualified `qualifyTable()` emission for runtime\n* SQL rendering.\n*/\nvar SqliteDatabase = class extends SqlNamespaceBase {\n\tid;\n\tentries;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.id = input.id;\n\t\tconst dispatched = hydrateNamespaceEntities(input.entries, /* @__PURE__ */ new Map([[\"table\", tableEntityKind]]), \"carry\");\n\t\tthis.entries = Object.freeze(blindCast(dispatched));\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: SQLITE_NAMESPACE_KIND,\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n\tget table() {\n\t\treturn this.entries.table ?? Object.freeze({});\n\t}\n\tqualifier() {\n\t\treturn \"\";\n\t}\n\tqualifyTable(tableName) {\n\t\treturn quoteIdentifier(tableName);\n\t}\n};\n/**\n* SQLite target `Namespace` concretion. SQLite has no schema or\n* database-namespacing concept at the SQL level — there is exactly one\n* effective namespace per connection, so the target ships a single\n* singleton bound to the framework's `UNBOUND_NAMESPACE_ID` slot.\n*\n* Qualifier emission elides the prefix entirely: rendered DDL and\n* queries look unqualified (`CREATE TABLE \"users\" (...)`), matching\n* SQLite's native dialect. Call sites stay polymorphic — they ask the\n* namespace for its qualifier and consume the empty/unqualified result\n* the same way Postgres consumes a `\"schema\"` prefix.\n*\n* The SQLite PSL interpreter rejects every explicit `namespace { … }`\n* block with a diagnostic naming SQLite; only the implicit\n* `__unspecified__` AST bucket reaches the SQLite interpreter, which\n* lowers it to this singleton.\n*/\nvar SqliteUnboundDatabase = class SqliteUnboundDatabase extends SqliteDatabase {\n\tstatic instance = new SqliteUnboundDatabase();\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: UNBOUND_NAMESPACE_ID,\n\t\t\tentries: { table: {} }\n\t\t});\n\t}\n};\n/**\n* The SQLite target's rejection of expression and partial indexes: the\n* family-shared authoring surfaces parse `expression:`/`where:` for every\n* SQL target, but SQLite neither renders nor introspects them (project\n* non-goal) — a contract carrying one must fail loudly at lowering instead\n* of silently producing an unverifiable index. Target-owned so no family\n* code branches on the target.\n*/\nfunction rejectSqlBodyIndexes(input) {\n\tconst tables = input.entries[\"table\"];\n\tif (tables === void 0) return;\n\tfor (const [tableName, table] of Object.entries(tables)) {\n\t\tconst indexes = blindCast(table).indexes;\n\t\tfor (const index of indexes ?? []) if (index.expression !== void 0 || index.where !== void 0) throw sqliteError(\"CONTRACT.ARGUMENT_INVALID\", `SQLite does not support expression or partial indexes: index \"${index.name ?? \"<unnamed>\"}\" on table \"${tableName}\" declares ${index.expression !== void 0 ? \"an expression\" : \"a where predicate\"}. Use a fields-only index, or author this index against a Postgres target.`);\n\t}\n}\nfunction buildSqliteNamespace(input) {\n\trejectSqlBodyIndexes(input);\n\tif (input.id !== UNBOUND_NAMESPACE_ID) throw sqliteError(\"CONTRACT.NAMESPACE_INVALID\", `buildSqliteNamespace: SQLite has no schema concept; the only valid namespace id is \"${UNBOUND_NAMESPACE_ID}\" (received \"${input.id}\").`, { meta: { received: input.id } });\n\tconst tableKind = input.entries[\"table\"];\n\tconst tableCount = tableKind !== void 0 ? Object.keys(tableKind).length : 0;\n\tconst hasUnknownKinds = Object.keys(input.entries).some((kind) => kind !== \"table\");\n\tif (tableCount === 0 && !hasUnknownKinds) return SqliteUnboundDatabase.instance;\n\treturn new SqliteDatabase({\n\t\tid: input.id,\n\t\tentries: input.entries\n\t});\n}\n/**\n* Target-supplied `Namespace` factory the SQLite target plumbs through\n* `defineContract({ createNamespace })`. SQLite has only one\n* effective namespace slot — the framework `UNBOUND_NAMESPACE_ID`\n* sentinel — so the factory always returns the singleton or a fresh\n* `SqliteDatabase` for the unbound slot with tables. The SQL family's\n* defensive validation in `defineContract` already rejects\n* user-declared SQLite namespaces, so this throw is a structural\n* safety net rather than a user-facing surface.\n*/\nfunction sqliteCreateNamespace(input) {\n\treturn buildSqliteNamespace(input);\n}\n//#endregion\n//#region src/core/sqlite-contract-serializer.ts\n/**\n* SQLite target `ContractSerializer` concretion. Mirrors the Postgres\n* shape: inherits the full SQL-family deserialization pipeline and\n* materialises namespace entries as SQLite database concretions that\n* expose `qualifyTable()` for runtime SQL rendering.\n*/\nvar SqliteContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map(), [], createDataTypeLookup(sqliteDataTypes));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\treturn buildSqliteNamespace(blindCast(super.hydrateSqlNamespaceEntry(nsId, raw)));\n\t}\n\tserializeContract(contract) {\n\t\tconst { storage, ...rest } = contract;\n\t\tconst namespacesJson = {};\n\t\tfor (const [nsId, ns] of Object.entries(storage.namespaces)) namespacesJson[nsId] = {\n\t\t\tid: ns.id,\n\t\t\tentries: this.serializeNamespaceEntries(ns.entries)\n\t\t};\n\t\treturn blindCast({\n\t\t\t...rest,\n\t\t\tstorage: {\n\t\t\t\tstorageHash: String(storage.storageHash),\n\t\t\t\tnamespaces: namespacesJson,\n\t\t\t\t...storage.types !== void 0 ? { types: this.serializeJsonObject(storage.types) } : {}\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\n//#region src/core/sqlite-contract-view.ts\nconst SqliteContractView = {\n\t/** Wrap an already-deserialized SQLite contract in a view. */\n\tfrom(contract) {\n\t\treturn buildSqlSingleNamespaceView(contract);\n\t},\n\t/** Deserialize a SQLite contract JSON envelope and wrap it in a view. */\n\tfromJson(json) {\n\t\treturn buildSqlSingleNamespaceView(new SqliteContractSerializer().deserializeContract(json));\n\t}\n};\n//#endregion\nexport { sqliteCreateNamespace as i, SqliteContractSerializer as n, SqliteUnboundDatabase as r, SqliteContractView as t };\n\n//# sourceMappingURL=sqlite-contract-view-CGfiGvKH.mjs.map"],"mappings":";;;;;;;;;;;AAWA,MAAM,wBAAwB;;;;;;AAM9B,IAAI,iBAAiB,cAAc,iBAAiB;CACnD;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,KAAK,MAAM;EAChB,MAAM,aAAa,yBAAyB,MAAM,yBAAyB,IAAI,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,GAAG,OAAO;EACzH,KAAK,UAAU,OAAO,OAAO,UAAU,UAAU,CAAC;EAClD,OAAO,eAAe,MAAM,QAAQ;GACnC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;EACD,WAAW,IAAI;CAChB;CACA,IAAI,QAAQ;EACX,OAAO,KAAK,QAAQ,SAAS,OAAO,OAAO,CAAC,CAAC;CAC9C;CACA,YAAY;EACX,OAAO;CACR;CACA,aAAa,WAAW;EACvB,OAAO,gBAAgB,SAAS;CACjC;AACD;;;;;;;;;;;;;;;;;;AAkBA,IAAI,wBAAwB,MAAM,8BAA8B,eAAe;CAC9E,OAAO,WAAW,IAAI,sBAAsB;CAC5C,cAAc;EACb,MAAM;GACL,IAAI;GACJ,SAAS,EAAE,OAAO,CAAC,EAAE;EACtB,CAAC;CACF;AACD;;;;;;;;;AASA,SAAS,qBAAqB,OAAO;CACpC,MAAM,SAAS,MAAM,QA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