@prisma/orm-target-sqlite 8.0.0-rc.22-dev.4 → 8.0.0-rc.22-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{adapter-BHJEOmT6.d.mts → adapter-etFmhVd4.d.mts} +7 -7
- package/dist/{adapter-BHJEOmT6.d.mts.map → adapter-etFmhVd4.d.mts.map} +1 -1
- package/dist/{adapter-Cff01Cgi-C19Fhc2M.mjs → adapter-gpb0ICA2-DPjB1dMR.mjs} +21 -11
- package/dist/adapter-gpb0ICA2-DPjB1dMR.mjs.map +1 -0
- package/dist/{adapter-xFPDhkod-BsdLsy9N.d.mts → adapter-xFPDhkod-Cio6up_5.d.mts} +3 -3
- package/dist/{adapter-xFPDhkod-BsdLsy9N.d.mts.map → adapter-xFPDhkod-Cio6up_5.d.mts.map} +1 -1
- package/dist/adapter.d.mts +11 -11
- package/dist/adapter.mjs +6 -6
- package/dist/adapter__adapter.d.mts +2 -2
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__codec-types.d.mts +3 -3
- package/dist/adapter__column-types.d.mts +1 -1
- package/dist/adapter__column-types.mjs +1 -1
- package/dist/adapter__control.d.mts +3 -3
- package/dist/adapter__control.mjs +5 -5
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +22 -13
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.d.mts +2 -2
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/adapter__types.d.mts +2 -2
- package/dist/{aggregates-CDMoiy_Z.d.mts → aggregates-Bee9csBL.d.mts} +6 -6
- package/dist/{aggregates-CDMoiy_Z.d.mts.map → aggregates-Bee9csBL.d.mts.map} +1 -1
- package/dist/{aggregates-D5fuFVMC.mjs → aggregates-DMvLJFlR.mjs} +9 -3
- package/dist/aggregates-DMvLJFlR.mjs.map +1 -0
- package/dist/codec-ids-9Fs9p6ST.d.mts +1 -0
- package/dist/codec-ids-BElbEYb_-CeWfv5bC.d.mts +21 -0
- package/dist/codec-ids-BElbEYb_-CeWfv5bC.d.mts.map +1 -0
- package/dist/codec-ids-BHBFCNsQ-C1Af_LGF.mjs +21 -0
- package/dist/codec-ids-BHBFCNsQ-C1Af_LGF.mjs.map +1 -0
- package/dist/codec-types-BQCSRfvR.d.mts +1 -0
- package/dist/{codec-types-COh75Bop-CUehAexc.d.mts → codec-types-CG5ZkqDU-DCx8ZvBg.d.mts} +10 -3
- package/dist/codec-types-CG5ZkqDU-DCx8ZvBg.d.mts.map +1 -0
- package/dist/codec-types-YpVaNlY0.d.mts +2 -0
- package/dist/{codecs-BJYruC-a-BKDGae3k.d.mts → codecs-BqOj4EKm-BaGeNd2m.d.mts} +127 -4
- package/dist/codecs-BqOj4EKm-BaGeNd2m.d.mts.map +1 -0
- package/dist/codecs-DzkRnjjE.d.mts +1 -0
- package/dist/{codecs-yZoH21Yj-lQXtGlEq.mjs → codecs-My4bmOU6-D4-b5qLd.mjs} +350 -22
- package/dist/codecs-My4bmOU6-D4-b5qLd.mjs.map +1 -0
- package/dist/{codecs-g-YI3BtK.mjs → codecs-R3kGRyq2.mjs} +2 -2
- package/dist/codecs-R3kGRyq2.mjs.map +1 -0
- package/dist/{column-types-Dxm0BpPv.d.mts → column-types-bTPNfz46.d.mts} +3 -3
- package/dist/{column-types-Dxm0BpPv.d.mts.map → column-types-bTPNfz46.d.mts.map} +1 -1
- package/dist/{column-types-DcbNOYVb.mjs → column-types-toYbR7mn.mjs} +2 -2
- package/dist/{column-types-DcbNOYVb.mjs.map → column-types-toYbR7mn.mjs.map} +1 -1
- package/dist/{contract-contributions-wweWdXMK-CN-d35Rj.mjs → contract-contributions-wweWdXMK-CwYZg4jC.mjs} +2 -2
- package/dist/{contract-contributions-wweWdXMK-CN-d35Rj.mjs.map → contract-contributions-wweWdXMK-CwYZg4jC.mjs.map} +1 -1
- package/dist/{contract-free-CYl1uzJ8.mjs → contract-free-BH73BZHy.mjs} +4 -4
- package/dist/{contract-free-CYl1uzJ8.mjs.map → contract-free-BH73BZHy.mjs.map} +1 -1
- package/dist/control-DGa_C2q6.d.mts +242 -0
- package/dist/control-DGa_C2q6.d.mts.map +1 -0
- package/dist/{control-VMpMSXk9.d.mts → control-DXzV_IVS.d.mts} +4 -4
- package/dist/{control-VMpMSXk9.d.mts.map → control-DXzV_IVS.d.mts.map} +1 -1
- package/dist/{data-type-entries-yQ-qYugg-C_NnX5WO.mjs → data-type-entries-Cp4hBeJB-DYer43by.mjs} +30 -3
- package/dist/data-type-entries-Cp4hBeJB-DYer43by.mjs.map +1 -0
- package/dist/{data-types-Dx3rHsbF.d.mts → data-types-CwpMoNK4.d.mts} +22 -2
- package/dist/data-types-CwpMoNK4.d.mts.map +1 -0
- package/dist/{data-types-coQrCWfS-yMCe4F52.mjs → data-types-DXMZNR8j-CWrJOA8C.mjs} +79 -4
- package/dist/data-types-DXMZNR8j-CWrJOA8C.mjs.map +1 -0
- package/dist/date-time-now-generators-T8JO6gR6-DBt5IyH5.mjs +64 -0
- package/dist/date-time-now-generators-T8JO6gR6-DBt5IyH5.mjs.map +1 -0
- package/dist/datetime-text-CbgLX4q3-BKp563Ja.mjs +32 -0
- package/dist/datetime-text-CbgLX4q3-BKp563Ja.mjs.map +1 -0
- package/dist/{ddl-BoTU7bCZ-CXNSFEtj.mjs → ddl-BvD-wVtg-BoEWa8CG.mjs} +3 -3
- package/dist/{ddl-BoTU7bCZ-CXNSFEtj.mjs.map → ddl-BvD-wVtg-BoEWa8CG.mjs.map} +1 -1
- package/dist/{default-normalizer-DGMXypHg-CPf7oyZA.mjs → default-normalizer-CsMhUEOe-CRieDElD.mjs} +23 -11
- package/dist/default-normalizer-CsMhUEOe-CRieDElD.mjs.map +1 -0
- package/dist/{default-normalizer-CkHy3JYk.d.mts → default-normalizer-CtNsZNRZ.d.mts} +3 -3
- package/dist/{default-normalizer-CkHy3JYk.d.mts.map → default-normalizer-CtNsZNRZ.d.mts.map} +1 -1
- package/dist/descriptor-meta-BwJWbIVt-B24ey04f.mjs +280 -0
- package/dist/descriptor-meta-BwJWbIVt-B24ey04f.mjs.map +1 -0
- package/dist/{descriptor-meta-DrNwC4vO-D7vuA6QK.mjs → descriptor-meta-DrNwC4vO-B9xeeDp9.mjs} +3 -3
- package/dist/{descriptor-meta-DrNwC4vO-D7vuA6QK.mjs.map → descriptor-meta-DrNwC4vO-B9xeeDp9.mjs.map} +1 -1
- package/dist/errors-D9vZNPSI-DoNmdfv7.mjs +105 -0
- package/dist/errors-D9vZNPSI-DoNmdfv7.mjs.map +1 -0
- package/dist/{migration-D0UlBTQw.mjs → migration-DYyfcQB_.mjs} +2 -2
- package/dist/{migration-D0UlBTQw.mjs.map → migration-DYyfcQB_.mjs.map} +1 -1
- package/dist/{op-factory-call-DADakw8V-yXzHuXlv.mjs → op-factory-call-BQYECylm-K7S_xgRS.mjs} +6 -6
- package/dist/{op-factory-call-DADakw8V-yXzHuXlv.mjs.map → op-factory-call-BQYECylm-K7S_xgRS.mjs.map} +1 -1
- package/dist/{pack-DqL_HWJX.d.mts → pack-CwFlRihn.d.mts} +179 -10
- package/dist/{pack-DqL_HWJX.d.mts.map → pack-CwFlRihn.d.mts.map} +1 -1
- package/dist/{planner-1zVd0jR2-mkF3bIWw.mjs → planner-DNwf8s8s-BoXZwpVs.mjs} +5 -5
- package/dist/{planner-1zVd0jR2-mkF3bIWw.mjs.map → planner-DNwf8s8s-BoXZwpVs.mjs.map} +1 -1
- package/dist/{planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs → planner-produced-sqlite-migration-Z9OWyjQn-DGMHz6I1.mjs} +4 -4
- package/dist/{planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs.map → planner-produced-sqlite-migration-Z9OWyjQn-DGMHz6I1.mjs.map} +1 -1
- package/dist/{render-ops-CwuscSzF-D3hoxOT_.mjs → render-ops-CJXrOY63-1y0nLsb8.mjs} +4 -4
- package/dist/{render-ops-CwuscSzF-D3hoxOT_.mjs.map → render-ops-CJXrOY63-1y0nLsb8.mjs.map} +1 -1
- package/dist/require-temporal-qbyZfPgl-DGJhYwmE.mjs +16 -0
- package/dist/require-temporal-qbyZfPgl-DGJhYwmE.mjs.map +1 -0
- package/dist/{runtime-YfPIbtO6.d.mts → runtime-BQKQH94p.d.mts} +2 -2
- package/dist/{runtime-YfPIbtO6.d.mts.map → runtime-BQKQH94p.d.mts.map} +1 -1
- package/dist/{runtime-CjIoI3sa.d.mts → runtime-ZsuC__oX.d.mts} +33 -2
- package/dist/runtime-ZsuC__oX.d.mts.map +1 -0
- package/dist/sql-renderer-CgY2Sghp.d.mts +1 -0
- package/dist/{sql-utils-XGT5Esi2-Zr2mqJf8.mjs → sql-utils-C9blmi9x-B90QedVA.mjs} +3 -3
- package/dist/{sql-utils-XGT5Esi2-Zr2mqJf8.mjs.map → sql-utils-C9blmi9x-B90QedVA.mjs.map} +1 -1
- package/dist/sqlite-contract-view-DJhc7pI7-Db5l4qrA.mjs +51 -0
- package/dist/sqlite-contract-view-DJhc7pI7-Db5l4qrA.mjs.map +1 -0
- package/dist/{sqlite-migration-BLyz5GQr-BMImgGTB.mjs → sqlite-migration-BxQ65pKq-C7siJGuR.mjs} +13 -10
- package/dist/sqlite-migration-BxQ65pKq-C7siJGuR.mjs.map +1 -0
- package/dist/{sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs → sqlite-unbound-database-Df3Wf5ZA-B1QemRgb.mjs} +5 -49
- package/dist/sqlite-unbound-database-Df3Wf5ZA-B1QemRgb.mjs.map +1 -0
- package/dist/target.d.mts +14 -13
- package/dist/target.mjs +22 -20
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__aggregates.mjs +1 -1
- package/dist/target__codec-ids.d.mts +3 -3
- package/dist/target__codec-ids.mjs +2 -2
- package/dist/target__codec-types.d.mts +3 -3
- package/dist/target__codecs.d.mts +3 -3
- package/dist/target__codecs.mjs +4 -4
- package/dist/target__contract-free.mjs +2 -2
- package/dist/target__control.d.mts +2 -2
- package/dist/target__control.mjs +42 -36
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-types.d.mts +2 -2
- package/dist/target__data-types.mjs +3 -3
- package/dist/target__default-normalizer.d.mts +1 -1
- package/dist/target__default-normalizer.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__runtime.d.mts +2 -2
- package/dist/target__runtime.mjs +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__sql-utils.mjs +1 -1
- package/dist/target__types.d.mts +2 -0
- package/dist/target__types.mjs +2 -0
- package/dist/types-COqCbSev.d.mts +56 -0
- package/dist/types-COqCbSev.d.mts.map +1 -0
- package/dist/{types-y5JlAv97.d.mts → types-DpDK9e9U.d.mts} +1 -1
- package/package.json +18 -12
- package/dist/adapter-Cff01Cgi-C19Fhc2M.mjs.map +0 -1
- package/dist/aggregates-D5fuFVMC.mjs.map +0 -1
- package/dist/codec-ids-CMbhYIsa.d.mts +0 -1
- package/dist/codec-ids-DuJYssXV-BPKbFNRL.d.mts +0 -14
- package/dist/codec-ids-DuJYssXV-BPKbFNRL.d.mts.map +0 -1
- package/dist/codec-ids-wgEvkCkg-WltuexMR.mjs +0 -14
- package/dist/codec-ids-wgEvkCkg-WltuexMR.mjs.map +0 -1
- package/dist/codec-types-COh75Bop-CUehAexc.d.mts.map +0 -1
- package/dist/codec-types-ELHfd82J.d.mts +0 -2
- package/dist/codec-types-PONhVn74.d.mts +0 -1
- package/dist/codecs-BJYruC-a-BKDGae3k.d.mts.map +0 -1
- package/dist/codecs-Dn0xoCuf.d.mts +0 -1
- package/dist/codecs-g-YI3BtK.mjs.map +0 -1
- package/dist/codecs-yZoH21Yj-lQXtGlEq.mjs.map +0 -1
- package/dist/control-jYLWcPv2.d.mts +0 -130
- package/dist/control-jYLWcPv2.d.mts.map +0 -1
- package/dist/data-type-entries-yQ-qYugg-C_NnX5WO.mjs.map +0 -1
- package/dist/data-types-Dx3rHsbF.d.mts.map +0 -1
- package/dist/data-types-coQrCWfS-yMCe4F52.mjs.map +0 -1
- package/dist/datetime-text-Bniwehv--BSQhnrdE.mjs +0 -9
- package/dist/datetime-text-Bniwehv--BSQhnrdE.mjs.map +0 -1
- package/dist/default-normalizer-DGMXypHg-CPf7oyZA.mjs.map +0 -1
- package/dist/descriptor-meta-BNuC8mOJ-BfS3KaDU.mjs +0 -105
- package/dist/descriptor-meta-BNuC8mOJ-BfS3KaDU.mjs.map +0 -1
- package/dist/descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs +0 -15
- package/dist/descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs.map +0 -1
- package/dist/errors-DnR-sMHS-D_gh214a.mjs +0 -38
- package/dist/errors-DnR-sMHS-D_gh214a.mjs.map +0 -1
- package/dist/runtime-CjIoI3sa.d.mts.map +0 -1
- package/dist/sql-renderer-brQ96quu.d.mts +0 -1
- package/dist/sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs.map +0 -1
- package/dist/sqlite-migration-BLyz5GQr-BMImgGTB.mjs.map +0 -1
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
import "./sqlite-contract-view-BDw8T5Cp-BfFajhe4.mjs";
|
|
2
|
+
import * as nowValues from "@prisma/orm-framework/type-implementations/now";
|
|
2
3
|
import { Namespace } from "@prisma/orm-framework/components/ir";
|
|
3
4
|
import { SqlNamespaceInput, SqlStorage } from "@prisma/orm-family-sql/contract/types";
|
|
4
5
|
import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
|
|
5
6
|
import { SqlRuntimeTargetDescriptor } from "@prisma/orm-family-sql/runtime";
|
|
6
7
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
8
|
+
import { Temporal } from "temporal-spec";
|
|
7
9
|
import { RuntimeTargetInstance } from "@prisma/orm-framework/components/execution";
|
|
8
10
|
import { JsonObject } from "@prisma/orm-framework/utils/json";
|
|
9
11
|
//#region ../../../3-targets/sqlite/1-target/dist/runtime.d.mts
|
|
12
|
+
//#region src/core/date-time-now-generators.d.ts
|
|
13
|
+
declare function instantNow(): Temporal.Instant;
|
|
14
|
+
declare function plainDateNow(): Temporal.PlainDate;
|
|
15
|
+
declare function plainTimeNow(): Temporal.PlainTime;
|
|
16
|
+
declare function instantStringNow(): string;
|
|
17
|
+
declare function timeStringNow(): string;
|
|
18
|
+
/**
|
|
19
|
+
* The SQLite "now" generators, one per date and time codec except `sqlite/datetime@1`, which uses the SQL family's `timestampNow`. All read the clock through `Date.now()`, write UTC and keep milliseconds, which every SQLite date and time type holds. The string generators write the text their type stores, with three fraction digits.
|
|
20
|
+
*/
|
|
21
|
+
declare const sqliteNowGenerators: readonly [{
|
|
22
|
+
readonly id: "instantNow";
|
|
23
|
+
readonly generate: typeof instantNow;
|
|
24
|
+
}, {
|
|
25
|
+
readonly id: "plainDateNow";
|
|
26
|
+
readonly generate: typeof plainDateNow;
|
|
27
|
+
}, {
|
|
28
|
+
readonly id: "plainTimeNow";
|
|
29
|
+
readonly generate: typeof plainTimeNow;
|
|
30
|
+
}, {
|
|
31
|
+
readonly id: "instantStringNow";
|
|
32
|
+
readonly generate: typeof instantStringNow;
|
|
33
|
+
}, {
|
|
34
|
+
readonly id: "dateStringNow";
|
|
35
|
+
readonly generate: typeof nowValues.dateStringNow;
|
|
36
|
+
}, {
|
|
37
|
+
readonly id: "timeStringNow";
|
|
38
|
+
readonly generate: typeof timeStringNow;
|
|
39
|
+
}];
|
|
40
|
+
//#endregion
|
|
10
41
|
//#region src/core/runtime/runtime-target.d.ts
|
|
11
42
|
interface SqliteRuntimeTargetInstance extends RuntimeTargetInstance<'sql', 'sqlite'> {}
|
|
12
43
|
declare const sqliteRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<'sqlite', SqliteRuntimeTargetInstance>;
|
|
@@ -24,5 +55,5 @@ declare class SqliteContractSerializer extends SqlContractSerializerBase<Contrac
|
|
|
24
55
|
serializeContract(contract: Contract<SqlStorage>): JsonObject;
|
|
25
56
|
}
|
|
26
57
|
//#endregion
|
|
27
|
-
export { SqliteRuntimeTargetInstance as n,
|
|
28
|
-
//# sourceMappingURL=runtime-
|
|
58
|
+
export { sqliteRuntimeTargetDescriptor as i, SqliteRuntimeTargetInstance as n, sqliteNowGenerators as r, SqliteContractSerializer as t };
|
|
59
|
+
//# sourceMappingURL=runtime-ZsuC__oX.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-ZsuC__oX.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;iBAWiB,cAAc,SAAS;iBACvB,gBAAgB,SAAS;iBACzB,gBAAgB,SAAS;iBACzB;iBACA;;;;cAIH;WACH;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB,UAAU;;WAE3B;WACA,iBAAiB;;;;UAIlB,oCAAoC;cAChC,+BAA+B,qCAAqC;;;;;;;;;cASpE,iCAAiC,0BAA0B,SAAS;EAChF;YACU,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./adapter-xFPDhkod-Cio6up_5.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region ../../../3-targets/sqlite/1-target/dist/sql-utils-
|
|
1
|
+
import { c as sqliteError } from "./errors-D9vZNPSI-DoNmdfv7.mjs";
|
|
2
|
+
//#region ../../../3-targets/sqlite/1-target/dist/sql-utils-C9blmi9x.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Shared SQL utility functions for the SQLite target.
|
|
5
5
|
*
|
|
@@ -59,4 +59,4 @@ const SQLITE_QUOTING = [
|
|
|
59
59
|
//#endregion
|
|
60
60
|
export { escapeLiteral as n, quoteIdentifier as r, SQLITE_QUOTING as t };
|
|
61
61
|
|
|
62
|
-
//# sourceMappingURL=sql-utils-
|
|
62
|
+
//# sourceMappingURL=sql-utils-C9blmi9x-B90QedVA.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql-utils-
|
|
1
|
+
{"version":3,"file":"sql-utils-C9blmi9x-B90QedVA.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/sql-utils-C9blmi9x.mjs"],"sourcesContent":["import { c as sqliteError } from \"./errors-D9vZNPSI.mjs\";\n//#region src/core/sql-utils.ts\n/**\n* Shared SQL utility functions for the SQLite target.\n*\n* These functions handle safe SQL identifier and literal escaping. They\n* live in `target-sqlite` (mirroring `target-postgres/src/core/sql-utils.ts`)\n* so both the control adapter (used at emit time) and the runtime adapter\n* (used at execute time) can depend on them through a single one-way edge:\n* `adapter-sqlite → target-sqlite`. Hosting them target-side avoids the\n* cyclic workspace dependency that would arise if `target-sqlite` reached\n* back into `adapter-sqlite` for these primitives.\n*/\nfunction quoteIdentifier(identifier) {\n\tif (identifier.length === 0) throw sqliteError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot be empty\", { meta: {\n\t\tvalue: identifier,\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.includes(\"\\0\")) throw sqliteError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot contain null bytes\", { meta: {\n\t\tvalue: identifier.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"identifier\"\n\t} });\n\treturn `\"${identifier.replace(/\"/g, \"\\\"\\\"\")}\"`;\n}\nfunction escapeLiteral(value) {\n\tif (value.includes(\"\\0\")) throw sqliteError(\"CONTRACT.IDENTIFIER_INVALID\", \"Literal value cannot contain null bytes\", { meta: {\n\t\tvalue: value.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"literal\"\n\t} });\n\treturn value.replace(/'/g, \"''\");\n}\n/** The quotes this target's SQL knows, for the check of SQL a migration writes into a statement. */\nconst SQLITE_QUOTING = [\n\t{\n\t\topen: \"'\",\n\t\tclose: \"'\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: false\n\t},\n\t{\n\t\topen: \"\\\"\",\n\t\tclose: \"\\\"\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: false\n\t},\n\t{\n\t\topen: \"`\",\n\t\tclose: \"`\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: false\n\t},\n\t{\n\t\topen: \"[\",\n\t\tclose: \"]\",\n\t\tdoubledCloseEscapes: false,\n\t\tbackslashEscapes: false\n\t}\n];\n//#endregion\nexport { escapeLiteral as n, quoteIdentifier as r, SQLITE_QUOTING as t };\n\n//# sourceMappingURL=sql-utils-C9blmi9x.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,gBAAgB,YAAY;CACpC,IAAI,WAAW,WAAW,GAAG,MAAM,YAAY,+BAA+B,8BAA8B,EAAE,MAAM;EACnH,OAAO;EACP,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,IAAI,GAAG,MAAM,YAAY,+BAA+B,wCAAwC,EAAE,MAAM;EAC/H,OAAO,WAAW,QAAQ,OAAO,KAAK;EACtC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,IAAI,WAAW,QAAQ,MAAM,MAAM,EAAE;AAC7C;AACA,SAAS,cAAc,OAAO;CAC7B,IAAI,MAAM,SAAS,IAAI,GAAG,MAAM,YAAY,+BAA+B,2CAA2C,EAAE,MAAM;EAC7H,OAAO,MAAM,QAAQ,OAAO,KAAK;EACjC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,MAAM,QAAQ,MAAM,IAAI;AAChC;;AAEA,MAAM,iBAAiB;CACtB;EACC,MAAM;EACN,OAAO;EACP,qBAAqB;EACrB,kBAAkB;CACnB;CACA;EACC,MAAM;EACN,OAAO;EACP,qBAAqB;EACrB,kBAAkB;CACnB;CACA;EACC,MAAM;EACN,OAAO;EACP,qBAAqB;EACrB,kBAAkB;CACnB;CACA;EACC,MAAM;EACN,OAAO;EACP,qBAAqB;EACrB,kBAAkB;CACnB;AACD"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { o as sqliteDataTypes } from "./data-types-DXMZNR8j-CWrJOA8C.mjs";
|
|
2
|
+
import { n as buildSqliteNamespace } from "./sqlite-unbound-database-Df3Wf5ZA-B1QemRgb.mjs";
|
|
3
|
+
import { createDataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
4
|
+
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
5
|
+
import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
|
|
6
|
+
import { buildSqlSingleNamespaceView } from "@prisma/orm-family-sql/contract/contract-view";
|
|
7
|
+
//#region ../../../3-targets/sqlite/1-target/dist/sqlite-contract-view-DJhc7pI7.mjs
|
|
8
|
+
/**
|
|
9
|
+
* SQLite target `ContractSerializer` concretion. Mirrors the Postgres
|
|
10
|
+
* shape: inherits the full SQL-family deserialization pipeline and
|
|
11
|
+
* materialises namespace entries as SQLite database concretions that
|
|
12
|
+
* expose `qualifyTable()` for runtime SQL rendering.
|
|
13
|
+
*/
|
|
14
|
+
var SqliteContractSerializer = class extends SqlContractSerializerBase {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(/* @__PURE__ */ new Map(), [], createDataTypeLookup(sqliteDataTypes));
|
|
17
|
+
}
|
|
18
|
+
hydrateSqlNamespaceEntry(nsId, raw) {
|
|
19
|
+
return buildSqliteNamespace(blindCast(super.hydrateSqlNamespaceEntry(nsId, raw)));
|
|
20
|
+
}
|
|
21
|
+
serializeContract(contract) {
|
|
22
|
+
const { storage, ...rest } = contract;
|
|
23
|
+
const namespacesJson = {};
|
|
24
|
+
for (const [nsId, ns] of Object.entries(storage.namespaces)) namespacesJson[nsId] = {
|
|
25
|
+
id: ns.id,
|
|
26
|
+
entries: this.serializeNamespaceEntries(ns.entries)
|
|
27
|
+
};
|
|
28
|
+
return blindCast({
|
|
29
|
+
...rest,
|
|
30
|
+
storage: {
|
|
31
|
+
storageHash: String(storage.storageHash),
|
|
32
|
+
namespaces: namespacesJson,
|
|
33
|
+
...storage.types !== void 0 ? { types: this.serializeJsonObject(storage.types) } : {}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const SqliteContractView = {
|
|
39
|
+
/** Wrap an already-deserialized SQLite contract in a view. */
|
|
40
|
+
from(contract) {
|
|
41
|
+
return buildSqlSingleNamespaceView(contract);
|
|
42
|
+
},
|
|
43
|
+
/** Deserialize a SQLite contract JSON envelope and wrap it in a view. */
|
|
44
|
+
fromJson(json) {
|
|
45
|
+
return buildSqlSingleNamespaceView(new SqliteContractSerializer().deserializeContract(json));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { SqliteContractView as n, SqliteContractSerializer as t };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=sqlite-contract-view-DJhc7pI7-Db5l4qrA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-contract-view-DJhc7pI7-Db5l4qrA.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/sqlite-contract-view-DJhc7pI7.mjs"],"sourcesContent":["import { o as sqliteDataTypes } from \"./data-types-DXMZNR8j.mjs\";\nimport { n as buildSqliteNamespace } from \"./sqlite-unbound-database-Df3Wf5ZA.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { SqlContractSerializerBase } from \"@internal/family-sql/ir\";\nimport { buildSqlSingleNamespaceView } from \"@internal/sql-contract/contract-view\";\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 { SqliteContractSerializer as n, SqliteContractView as t };\n\n//# sourceMappingURL=sqlite-contract-view-DJhc7pI7.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,IAAI,2BAA2B,cAAc,0BAA0B;CACtE,cAAc;EACb,sBAAsB,IAAI,IAAI,GAAG,CAAC,GAAG,qBAAqB,eAAe,CAAC;CAC3E;CACA,yBAAyB,MAAM,KAAK;EACnC,OAAO,qBAAqB,UAAU,MAAM,yBAAyB,MAAM,GAAG,CAAC,CAAC;CACjF;CACA,kBAAkB,UAAU;EAC3B,MAAM,EAAE,SAAS,GAAG,SAAS;EAC7B,MAAM,iBAAiB,CAAC;EACxB,KAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,QAAQ,UAAU,GAAG,eAAe,QAAQ;GACnF,IAAI,GAAG;GACP,SAAS,KAAK,0BAA0B,GAAG,OAAO;EACnD;EACA,OAAO,UAAU;GAChB,GAAG;GACH,SAAS;IACR,aAAa,OAAO,QAAQ,WAAW;IACvC,YAAY;IACZ,GAAG,QAAQ,UAAU,KAAK,IAAI,EAAE,OAAO,KAAK,oBAAoB,QAAQ,KAAK,EAAE,IAAI,CAAC;GACrF;EACD,CAAC;CACF;AACD;AAGA,MAAM,qBAAqB;;CAE1B,KAAK,UAAU;EACd,OAAO,4BAA4B,QAAQ;CAC5C;;CAEA,SAAS,MAAM;EACd,OAAO,4BAA4B,IAAI,yBAAyB,CAAC,CAAC,oBAAoB,IAAI,CAAC;CAC5F;AACD"}
|
package/dist/{sqlite-migration-BLyz5GQr-BMImgGTB.mjs → sqlite-migration-BxQ65pKq-C7siJGuR.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as sqliteCharacterVarying,
|
|
3
|
-
import {
|
|
4
|
-
import { n as encodeSqliteDatetime } from "./codecs-
|
|
5
|
-
import { n as escapeLiteral } from "./sql-utils-
|
|
6
|
-
import { n as SqliteContractView } from "./sqlite-contract-view-
|
|
7
|
-
import { n as sqliteResolveDefault } from "./default-normalizer-
|
|
8
|
-
import { C as sqliteDefaultToDdlColumnDefault, S as renameTableSteps, _ as buildRecreateSummary, a as DropColumnCall, c as INLINE_AUTOINCREMENT_PRIMARY_KEY, d as RemoveStoredValueCall, f as RenameColumnCall, g as buildRecreatePostchecks, i as DataTransformCall, m as ReplaceStoredValueCall, n as CreateIndexCall, o as DropIndexCall, p as RenameTableCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RecreateTableCall, w as sqliteIdentifiersCollide, y as indexReplacementCalls } from "./op-factory-call-
|
|
1
|
+
import { p as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_INTEGER_CODEC_ID } from "./codec-ids-BHBFCNsQ-C1Af_LGF.mjs";
|
|
2
|
+
import { _ as sqliteText, a as sqliteCharacterVarying, f as sqliteDuration, g as sqliteReal, h as sqliteJson, l as sqliteDatetime, m as sqliteInteger, r as sqliteCharacter, s as sqliteDate, t as sqliteBlob, y as sqliteTime } from "./data-types-DXMZNR8j-CWrJOA8C.mjs";
|
|
3
|
+
import { c as sqliteError, r as errorSqliteMigrationStackMissing } from "./errors-D9vZNPSI-DoNmdfv7.mjs";
|
|
4
|
+
import { n as encodeSqliteDatetime } from "./codecs-My4bmOU6-D4-b5qLd.mjs";
|
|
5
|
+
import { n as escapeLiteral } from "./sql-utils-C9blmi9x-B90QedVA.mjs";
|
|
6
|
+
import { n as SqliteContractView } from "./sqlite-contract-view-DJhc7pI7-Db5l4qrA.mjs";
|
|
7
|
+
import { n as sqliteResolveDefault } from "./default-normalizer-CsMhUEOe-CRieDElD.mjs";
|
|
8
|
+
import { C as sqliteDefaultToDdlColumnDefault, S as renameTableSteps, _ as buildRecreateSummary, a as DropColumnCall, c as INLINE_AUTOINCREMENT_PRIMARY_KEY, d as RemoveStoredValueCall, f as RenameColumnCall, g as buildRecreatePostchecks, i as DataTransformCall, m as ReplaceStoredValueCall, n as CreateIndexCall, o as DropIndexCall, p as RenameTableCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RecreateTableCall, w as sqliteIdentifiersCollide, y as indexReplacementCalls } from "./op-factory-call-BQYECylm-K7S_xgRS.mjs";
|
|
9
9
|
import { t as CONTROL_TABLE_NAMES } from "./control-tables-D_o8dKRB-n_QqsXcm.mjs";
|
|
10
10
|
import { DdlColumn, ForeignKeyConstraint, PrimaryKeyConstraint, UniqueConstraint } from "@prisma/orm-family-sql/relational-core/ast";
|
|
11
11
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -24,7 +24,7 @@ import { namingOf, namingOfLiveName, parseWireName } from "@prisma/orm-family-sq
|
|
|
24
24
|
import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
|
|
25
25
|
import { Migration } from "@prisma/orm-family-sql/family/migration";
|
|
26
26
|
import { MigrationContractViews } from "@prisma/orm-toolchain/migration-tools/migration";
|
|
27
|
-
//#region ../../../3-targets/sqlite/1-target/dist/sqlite-migration-
|
|
27
|
+
//#region ../../../3-targets/sqlite/1-target/dist/sqlite-migration-BxQ65pKq.mjs
|
|
28
28
|
/**
|
|
29
29
|
* The SQLite expected-side projection: contract → flat relational schema IR.
|
|
30
30
|
*
|
|
@@ -245,6 +245,9 @@ function tableConstraintsFromNode(table, hasInlinePk) {
|
|
|
245
245
|
}
|
|
246
246
|
const DATA_TYPE_FILL_VALUES = /* @__PURE__ */ new Map([
|
|
247
247
|
[sqliteDatetime.id, `'${escapeLiteral(encodeSqliteDatetime(/* @__PURE__ */ new Date(0)))}'`],
|
|
248
|
+
[sqliteDate.id, "'1970-01-01'"],
|
|
249
|
+
[sqliteTime.id, "'00:00:00.000'"],
|
|
250
|
+
[sqliteDuration.id, "'PT0S'"],
|
|
248
251
|
[sqliteJson.id, `'{}'`],
|
|
249
252
|
[sqliteInteger.id, "0"],
|
|
250
253
|
[sqliteReal.id, "0"],
|
|
@@ -1313,4 +1316,4 @@ function copyExpressionSlotsOf(copyExpressions, table, option = "copyExpressions
|
|
|
1313
1316
|
//#endregion
|
|
1314
1317
|
export { sqliteSchemaTables as _, createWorkingSchema as a, verifySqliteDatabaseSchema as b, issueNode as c, renameTableByHandStatements as d, renderRenameTableCall as f, sqlitePlannerStrategies as g, sqliteContractToSchema as h, conflictForDisallowedCall as i, pairIndexReplacements as l, sqliteColumnRenameCall as m, buildSqlitePlanDiff as n, diffSqliteSchema as o, sqliteActualSchema as p, coalesceSubtreeIssues as r, indexNameCaseChange as s, SqliteMigration as t, planIssues as u, sqliteTableRenameByHand as v, sqliteTableRenameCall as y };
|
|
1315
1318
|
|
|
1316
|
-
//# sourceMappingURL=sqlite-migration-
|
|
1319
|
+
//# sourceMappingURL=sqlite-migration-BxQ65pKq-C7siJGuR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-migration-BxQ65pKq-C7siJGuR.mjs","names":["#current","#endView","#startView","#renames"],"sources":["../../../../3-targets/sqlite/1-target/dist/sqlite-migration-BxQ65pKq.mjs"],"sourcesContent":["import { p as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_INTEGER_CODEC_ID } from \"./codec-ids-BHBFCNsQ.mjs\";\nimport { _ as sqliteText, a as sqliteCharacterVarying, f as sqliteDuration, g as sqliteReal, h as sqliteJson, l as sqliteDatetime, m as sqliteInteger, r as sqliteCharacter, s as sqliteDate, t as sqliteBlob, y as sqliteTime } from \"./data-types-DXMZNR8j.mjs\";\nimport { c as sqliteError, r as errorSqliteMigrationStackMissing } from \"./errors-D9vZNPSI.mjs\";\nimport { n as encodeSqliteDatetime } from \"./codecs-My4bmOU6.mjs\";\nimport { n as escapeLiteral } from \"./sql-utils-C9blmi9x.mjs\";\nimport { t as SqliteContractView } from \"./sqlite-contract-view-DJhc7pI7.mjs\";\nimport { n as sqliteResolveDefault } from \"./default-normalizer-CsMhUEOe.mjs\";\nimport { C as sqliteDefaultToDdlColumnDefault, S as INLINE_AUTOINCREMENT_PRIMARY_KEY, T as sqliteIdentifiersCollide, _ as buildRecreatePostchecks, a as DropColumnCall, d as RenameColumnCall, f as RenameTableCall, i as DataTransformCall, l as RecreateTableCall, m as indexReplacementCalls, n as CreateIndexCall, o as DropIndexCall, p as ReplaceStoredValueCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RemoveStoredValueCall, v as buildRecreateSummary, x as renameTableSteps } from \"./op-factory-call-BQYECylm.mjs\";\nimport { t as CONTROL_TABLE_NAMES } from \"./control-tables-D_o8dKRB.mjs\";\nimport { DdlColumn, ForeignKeyConstraint, PrimaryKeyConstraint, UniqueConstraint } from \"@internal/sql-relational-core/ast\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { dataTypeParams } from \"@internal/framework-components/codec\";\nimport { isSqlDataType, nameIsCatalogText, renderSqlTypeName, sqlDataTypeOfCodec } from \"@internal/sql-contract/data-type\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { diffSchemas, issueOutcome, orderIssuesByDependencies } from \"@internal/framework-components/control\";\nimport { contractToSchemaIR, extractCodecControlHooks, resolveColumnRenameAgainst, resolveTableRenameAgainst, sqlTypeLookupsOf, unmatchedColumnRename, unmatchedTableRename } from \"@internal/family-sql/control\";\nimport { PrimaryKey, RelationalSchemaNodeKind, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlTableIR, SqlUniqueIR, relationalNodeGranularity, sqlColumnTypesEqual } from \"@internal/sql-schema-ir/types\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { verifySqlSchemaByDiff } from \"@internal/family-sql/diff\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { namingOf, namingOfLiveName, parseWireName } from \"@internal/sql-schema-ir/naming\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\nimport { sqlTextOf } from \"@internal/sql-relational-core/contract-free\";\nimport { Migration } from \"@internal/family-sql/migration\";\nimport { MigrationContractViews } from \"@internal/migration-tools/migration\";\n//#region src/core/migrations/diff-database-schema.ts\n/**\n* The SQLite expected-side projection: contract → flat relational schema IR.\n*\n* Each column's type is written from the data type its codec represents.\n* Every expected column also carries its `codecRef` unconditionally\n* (Decision 5) — the planner's op-builders resolve DDL rendering from it at\n* plan time, so no separate render stamper is threaded here.\n*/\nfunction sqliteContractToSchema(contract, types) {\n\treturn contractToSchemaIR(contract, {\n\t\tannotationNamespace: \"sqlite\",\n\t\tresolveDefault: sqliteResolveDefault,\n\t\tdataTypeLookup: types.dataTypeLookup,\n\t\tcodecLookup: types.codecLookup\n\t});\n}\n/**\n* The SQLite schema verify: the full-tree node-diff verdict wrapped in the\n* issue-based result envelope. Used by the runner's post-apply check; the\n* family `verifySchema` runs the same composition via the descriptor hook.\n*/\nfunction verifySqliteDatabaseSchema(input) {\n\treturn verifySqlSchemaByDiff({\n\t\tcontract: input.contract,\n\t\tschema: input.actualSchema,\n\t\tstrict: input.strict,\n\t\tframeworkComponents: input.frameworkComponents,\n\t\tdiffSchema: diffSqliteSchema,\n\t\tgranularityOf: relationalNodeGranularity\n\t});\n}\n/**\n* Resolves a verdict-diff issue's subject table's declared control policy\n* directly from the contract. SQLite's expected tree is flat, so the issue\n* path carries no namespace segment — `path[1]` is the table name (`path[0]`\n* is the tree root's own id); every contract namespace is searched for that\n* table name (table names are globally unique in the flat tree — duplicates\n* across namespaces are rejected earlier, at `contractToSchemaIR`).\n*/\nfunction resolveControlPolicy(issue, contract) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return void 0;\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tconst table = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName\n\t\t});\n\t\tif (table !== void 0) return table.control;\n\t}\n}\n/**\n* The SQLite full-tree node diff for the family verify verdict: derive the\n* expected flat tree with resolved leaf values (parameterized types written\n* with their parameters; FK nodes born with the flat empty\n* `resolvedReferencedNamespace`), and run the generic differ over the trees\n* as derived. Flat targets need no ownership scoping. The codec `verifyType`\n* hooks run once per contract namespace with tables, each against the sole\n* flat actual root — exactly the legacy per-namespace pairing.\n*/\nfunction diffSqliteSchema(input) {\n\tconst types = sqlTypeLookupsOf(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, types);\n\tconst actual = input.schema instanceof SqlSchemaIR ? input.schema : blindCast(input.schema);\n\treturn {\n\t\tissues: diffSchemas(expected, actual),\n\t\tresolveControlPolicy: (issue) => resolveControlPolicy(issue, input.contract),\n\t\tnamespacePairs: Object.values(input.contract.storage.namespaces).filter((ns) => Object.keys(ns.entries.table ?? {}).length > 0).map(() => ({ actual }))\n\t};\n}\n/**\n* The SQLite planner's diff input: the same tree-building\n* `diffSqliteSchema` uses (FK nodes born flat). One differ\n* drives both verify and plan over the trees as derived; this is the plan-side\n* derivation — column DDL resolves from each expected column's `codecRef` at\n* plan time (`column-ddl-rendering.ts`), so no separate render stamping happens here.\n*/\nfunction buildSqlitePlanDiff(input) {\n\tconst types = sqlTypeLookupsOf(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, types);\n\tconst actual = sqliteActualSchema(input.actualSchema);\n\treturn {\n\t\texpected,\n\t\tactual,\n\t\tissues: diffSchemas(expected, actual)\n\t};\n}\n/** The schema a plan starts from as a `SqlSchemaIR`, its table and column names taken from their keys. */\nfunction sqliteActualSchema(actualSchema) {\n\treturn new SqlSchemaIR(withRecordKeyNames(actualSchema));\n}\n/**\n* Every schema-tree builder in this codebase derives a table's / column's\n* `name` from the record key it's stored under (`contractToSchemaIR`,\n* the SQLite introspection adapter) rather than trusting a redundant\n* embedded field — the record key IS the identity. Mirrors that discipline\n* for the actual/live tree before construction, so `SqlTableIR.id` /\n* `SqlColumnIR.id` (both derived from `.name`) are always correct without\n* requiring every caller to duplicate the key onto the value. A no-op for a\n* tree that already carries matching names (the real introspection adapter\n* always does).\n*/\nfunction withRecordKeyNames(actualSchema) {\n\tconst raw = blindCast(actualSchema);\n\tconst tables = {};\n\tfor (const [tableName, table] of Object.entries(raw.tables ?? {})) {\n\t\tconst rawTable = blindCast(table);\n\t\tconst columns = {};\n\t\tfor (const [columnName, column] of Object.entries(blindCast(table).columns ?? {})) columns[columnName] = column instanceof SqlColumnIR ? column.name === columnName ? column : column.withName(columnName) : {\n\t\t\t...blindCast(column),\n\t\t\tname: columnName\n\t\t};\n\t\ttables[tableName] = {\n\t\t\t...rawTable,\n\t\t\tname: tableName,\n\t\t\tcolumns,\n\t\t\tforeignKeys: rawTable.foreignKeys ?? [],\n\t\t\tuniques: rawTable.uniques ?? [],\n\t\t\tindexes: rawTable.indexes ?? []\n\t\t};\n\t}\n\treturn { tables };\n}\n//#endregion\n//#region src/core/migrations/column-ddl-rendering.ts\n/**\n* The type DDL writes for a column node: the name of the type it is stored as, with the parameters as the contract writes them, in upper case, or as given for a data type whose name is its catalog text, since verify compares that text exactly (ADR 273).\n*/\nfunction columnTypeSql(column) {\n\tconst type = column.storedType;\n\tif (type === void 0 || !isSqlDataType(type)) throw new InternalError(`column \"${column.name}\" has no data type; the expected tree must be derived via contractToSchemaIR for planning`);\n\tconst written = renderSqlTypeName(type, dataTypeParams(type, column.codecRef?.typeParams));\n\treturn nameIsCatalogText(type) ? written : written.toUpperCase();\n}\n/** The default DDL writes: the one the contract authored; `resolvedDefault` exists for the diff comparison. */\nfunction ddlDefaultOf(column) {\n\treturn column.authoredDefault ?? column.resolvedDefault;\n}\n/**\n* True when the column is rendered inline as `INTEGER PRIMARY KEY\n* AUTOINCREMENT` — the sole member of the table's primary key with an\n* `autoincrement()` default. Node-based sibling of the retired\n* `isInlineAutoincrementPrimaryKey` (which read the raw `StorageTable`);\n* reads the table/column nodes instead.\n*/\nfunction isInlineAutoincrementPrimaryKeyNode(table, column) {\n\tif (table.primaryKey?.columns.length !== 1) return false;\n\tif (table.primaryKey.columns[0] !== column.name) return false;\n\treturn column.resolvedDefault?.kind === \"function\" && column.resolvedDefault.expression === \"autoincrement()\";\n}\n/**\n* Builds the flat `SqliteColumnSpec` `AddColumnCall` / `RecreateTableCall`\n* need, with the type the column is stored as.\n*/\nfunction columnSpecFromNode(column, inline) {\n\tconst typeSql = columnTypeSql(column);\n\treturn {\n\t\tname: column.name,\n\t\ttypeSql,\n\t\t...inline ? {} : {\n\t\t\t...ifDefined(\"default\", ddlDefaultOf(column)),\n\t\t\t...ifDefined(\"codecRef\", column.codecRef)\n\t\t},\n\t\tnullable: column.nullable,\n\t\t...inline ? { inlineAutoincrementPrimaryKey: true } : {}\n\t};\n}\n/**\n* Builds the `DdlColumn` the `CreateTableCall` path needs, with the type the\n* column is stored as.\n*/\nfunction ddlColumnFromNode(column, inline) {\n\tconst typeSql = columnTypeSql(column);\n\tif (inline) return new DdlColumn({\n\t\tname: column.name,\n\t\ttype: `${typeSql}${INLINE_AUTOINCREMENT_PRIMARY_KEY}`\n\t});\n\tconst colDefault = sqliteDefaultToDdlColumnDefault(ddlDefaultOf(column));\n\treturn new DdlColumn({\n\t\tname: column.name,\n\t\ttype: typeSql,\n\t\t...!column.nullable ? { notNull: true } : {},\n\t\t...colDefault !== void 0 ? { default: colDefault } : {},\n\t\t...column.codecRef !== void 0 ? { codecRef: column.codecRef } : {}\n\t});\n}\n/**\n* Builds the table-level constraints (PK / unique / FK) for a `CreateTable`\n* path from the table node — the node-sourced sibling of the retired\n* contract-based `tableToDdlParts`'s constraint half.\n*\n* A check constraint on the table node throws rather than being dropped.\n* `@@check` is refused earlier, by the `sql.checkConstraint` capability gate in\n* PSL interpretation. The TS `check()` builder is not gated there — capabilities\n* are adapter-reported and reach the contract only after it is built — so a\n* `check()` declared against SQLite arrives here, and this is where it is\n* refused. It is the primary enforcement point for that surface, and the safety\n* net for a contract that reached storage some other way.\n*/\nfunction tableConstraintsFromNode(table, hasInlinePk) {\n\tconst constraints = [];\n\tif (table.primaryKey && !hasInlinePk) constraints.push(new PrimaryKeyConstraint({ columns: table.primaryKey.columns }));\n\tfor (const check of table.checks ?? []) throw sqliteError(\"CONTRACT.CONSTRAINT_INVALID\", `The SQLite target does not support CHECK constraints (constraint \"${check.name}\" on table \"${table.name}\"). The \"checkConstraint\" capability is Postgres-only — remove the \"@@check\" / \"check()\" declaration, or target Postgres.`, { meta: {\n\t\tconstraintName: check.name,\n\t\ttableName: table.name\n\t} });\n\tfor (const u of table.uniques) constraints.push(new UniqueConstraint({\n\t\tcolumns: u.columns,\n\t\t...u.name !== void 0 ? { name: u.name } : {}\n\t}));\n\tfor (const fk of table.foreignKeys) constraints.push(new ForeignKeyConstraint({\n\t\tcolumns: fk.columns,\n\t\trefTable: fk.referencedTable,\n\t\trefColumns: fk.referencedColumns,\n\t\t...fk.name !== void 0 ? { name: fk.name } : {},\n\t\t...fk.onDelete !== void 0 ? { onDelete: fk.onDelete } : {},\n\t\t...fk.onUpdate !== void 0 ? { onUpdate: fk.onUpdate } : {}\n\t}));\n\treturn constraints;\n}\n//#endregion\n//#region src/core/migrations/planner-fill-values.ts\nconst DATA_TYPE_FILL_VALUES = /* @__PURE__ */ new Map([\n\t[sqliteDatetime.id, `'${escapeLiteral(encodeSqliteDatetime(/* @__PURE__ */ new Date(0)))}'`],\n\t[sqliteDate.id, \"'1970-01-01'\"],\n\t[sqliteTime.id, \"'00:00:00.000'\"],\n\t[sqliteDuration.id, \"'PT0S'\"],\n\t[sqliteJson.id, `'{}'`],\n\t[sqliteInteger.id, \"0\"],\n\t[sqliteReal.id, \"0\"],\n\t[sqliteText.id, \"''\"],\n\t[sqliteCharacter.id, \"''\"],\n\t[sqliteCharacterVarying.id, \"''\"],\n\t[sqliteBlob.id, \"X''\"]\n]);\nfunction isParamRecord(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/**\n* The SQL value a new required column takes in the rows a table already has, or `undefined` when\n* its type has none: the column's codec hook first, as on Postgres, then a value of its data type.\n*/\nfunction sqliteFillValue(column, codecHooks, types) {\n\tconst codecRef = column.codecRef;\n\tif (codecRef === void 0 || column.many === true) return void 0;\n\tconst dataType = sqlDataTypeOfCodec(codecRef.codecId, types).id;\n\tconst fromHook = codecHooks.get(codecRef.codecId)?.resolveIdentityValue?.({\n\t\tdataType,\n\t\tcodecId: codecRef.codecId,\n\t\t...isParamRecord(codecRef.typeParams) ? { typeParams: codecRef.typeParams } : {}\n\t});\n\tif (fromHook !== void 0) return fromHook ?? void 0;\n\treturn DATA_TYPE_FILL_VALUES.get(dataType);\n}\n//#endregion\n//#region src/core/migrations/planner-strategies.ts\n/**\n* SQLite migration strategies.\n*\n* Each strategy examines the node-typed issue list, consumes issues it\n* handles, and returns the `SqliteOpFactoryCall[]` to address them. The issue\n* planner runs each strategy in order and routes whatever's left through\n* `mapNodeIssueToCall`.\n*\n* SQLite has no enums and no component-declared database dependencies. The\n* recipe that needs strategy-level multi-issue consumption is `recreateTable`,\n* which absorbs type/nullability/default/constraint mismatches, and required\n* columns added to existing tables, for a given table into one rebuild.\n*/\n/**\n* Classifies a node issue into the operation class a recreate absorbing it\n* would need, or `null` when the strategy doesn't handle this node/reason at\n* all (table/column not-found-or-not-expected, and index issues — those are\n* standalone ops, never folded into a recreate).\n*\n* Column drift is a single `not-equal` issue (type and nullability compared\n* together by `SqlColumnIR.isEqualTo`): a type change is destructive, because\n* the copy can change values; a nullability change alone is widening, because\n* a tightening copy fails on a NULL rather than losing it.\n*/\n/** The column of a column issue, which `classifyNodeIssue` classes destructive only for a type change. */\nfunction columnNameOf(issue) {\n\treturn blindCast(issue.expected).name;\n}\n/**\n* The changes of codec a table rebuild's copy makes without losing a value: the column's type\n* affinity stores each old value as the same value of the new type. An integer becomes its decimal\n* text; a real is not listed, since SQLite writes it as text with fifteen significant digits. Keyed\n* by codec, not data type, because `Int` and `BigInt` differ only in their codec.\n*/\nconst LOSSLESS_COPIES = /* @__PURE__ */ new Set([\n\t`${SQLITE_INTEGER_CODEC_ID}→${SQLITE_TEXT_CODEC_ID}`,\n\t`${SQLITE_BIGINT_CODEC_ID}→${SQLITE_TEXT_CODEC_ID}`,\n\t`${SQLITE_INTEGER_CODEC_ID}→${SQLITE_BIGINT_CODEC_ID}`\n]);\nfunction copyKeepsEveryValue(fromCodec, to) {\n\tconst toCodec = to.codecRef?.codecId;\n\treturn fromCodec !== void 0 && toCodec !== void 0 && LOSSLESS_COPIES.has(`${fromCodec}→${toCodec}`);\n}\nfunction classifyNodeIssue(issue, ctx) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return null;\n\tswitch (blindCast(node).nodeKind) {\n\t\tcase RelationalSchemaNodeKind.column: {\n\t\t\tif (issueOutcome(issue) !== \"not-equal\") return null;\n\t\t\tconst expected = blindCast(issue.expected);\n\t\t\tconst actual = blindCast(issue.actual);\n\t\t\tconst fromCodec = ctx.originCodecId(String(issue.path[1]), actual.name);\n\t\t\treturn !sqlColumnTypesEqual(expected, actual) && !copyKeepsEveryValue(fromCodec, expected) ? \"destructive\" : \"widening\";\n\t\t}\n\t\tcase RelationalSchemaNodeKind.columnDefault:\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.foreignKey:\n\t\tcase RelationalSchemaNodeKind.unique: return \"widening\";\n\t\tdefault: return null;\n\t}\n}\nfunction columnNode(node) {\n\treturn blindCast(node);\n}\nfunction isColumnIssue(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\treturn node !== void 0 && blindCast(node).nodeKind === RelationalSchemaNodeKind.column;\n}\n/** The column a `--convert` or `--backfill` statement of `kind` names, if one names it. */\nfunction statementColumn(ctx, kind, tableName, columnName) {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return void 0;\n\treturn ctx.statementColumns[kind].find((column) => column.table === tableName && column.column === columnName);\n}\n/** A column the plan adds to a table the database already has. */\nfunction addedColumn(issue, ctx) {\n\tif (issueOutcome(issue) !== \"not-found\" || !isColumnIssue(issue)) return void 0;\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0 || ctx.actual.tables[tableName] === void 0) return void 0;\n\treturn columnNode(issue.expected);\n}\n/**\n* A required column with no default that the plan adds to a table the database already has, so\n* existing rows need a value for it.\n*/\nfunction addedRequiredColumn(issue, ctx) {\n\tconst column = addedColumn(issue, ctx);\n\treturn column === void 0 || column.nullable || column.resolvedDefault !== void 0 ? void 0 : column;\n}\nconst CLASS_ORDER = [\n\t\"additive\",\n\t\"widening\",\n\t\"data\",\n\t\"destructive\"\n];\nfunction highestClass(classes) {\n\treturn classes.reduce((highest, next) => CLASS_ORDER.indexOf(next) > CLASS_ORDER.indexOf(highest) ? next : highest, \"additive\");\n}\n/**\n* Groups recreate-eligible issues by table and emits one `RecreateTableCall` per table, removing\n* the issues it consumed so `mapNodeIssueToCall` does not handle them again.\n*\n* - A type change is `destructive`, since the copy can change values, unless a `--convert`\n* statement names the column: the copy then goes through a slot the user fills, and the rebuild\n* is `data`. Either way the rebuild checks after its copy that every value took the new type.\n* - A nullability or constraint change alone is `widening`: a tightening copy fails on a NULL\n* rather than losing it.\n* - A required column with no default added to an existing table is copied from a temporary value\n* (`additive`). A column in a key or foreign key, whose values come from a value set, or whose\n* type has no such value is carried with nothing to copy from: the rebuild succeeds on an empty\n* table and fails on `NOT NULL` when the table has rows. A column a `--backfill` statement names\n* was added nullable and filled by earlier calls, so the rebuild copies it like a live column.\n* - A rebuild that leaves a live column out loses its values, so it is `destructive`.\n* - Any other column added to a table the plan rebuilds, optional or with a default, and an index\n* on it, are left to the rebuild, which creates them from the new table's spec. The plan has no\n* separate add, so the rebuild's source table is the live one (`additive`).\n*\n* The table shapes come from `ctx.expected` and `ctx.actual`, keyed by table name: SQLite is a\n* flat, single-namespace target, and one issue only carries its own node.\n*/\nconst recreateTableStrategy = (issues, ctx) => {\n\tconst byTable = /* @__PURE__ */ new Map();\n\tconst consumed = /* @__PURE__ */ new Set();\n\tconst codecHooks = extractCodecControlHooks(ctx.frameworkComponents);\n\tconst rebuildOf = (tableName) => {\n\t\tconst existing = byTable.get(tableName);\n\t\tif (existing !== void 0) return existing;\n\t\tconst created = {\n\t\t\tissues: [],\n\t\t\tclasses: [],\n\t\t\tretypedColumns: [],\n\t\t\tcopyExpressions: {},\n\t\t\ttemporaryValues: {},\n\t\t\taddedColumns: []\n\t\t};\n\t\tbyTable.set(tableName, created);\n\t\treturn created;\n\t};\n\tfor (const issue of issues) {\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0) continue;\n\t\tconst added = addedRequiredColumn(issue, ctx);\n\t\tif (added !== void 0) {\n\t\t\tconst expectedTable = ctx.expected.tables[tableName];\n\t\t\tif (statementColumn(ctx, \"backfill\", tableName, added.name) !== void 0) {\n\t\t\t\tconst rebuild = rebuildOf(tableName);\n\t\t\t\trebuild.issues.push(issue);\n\t\t\t\trebuild.addedColumns.push(added.name);\n\t\t\t\trebuild.classes.push(\"widening\");\n\t\t\t\tconsumed.add(issue);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst fill = expectedTable === void 0 || !ctx.takesTemporaryValue(tableName, added.name) ? void 0 : sqliteFillValue(added, codecHooks, ctx.types);\n\t\t\tconst rebuild = rebuildOf(tableName);\n\t\t\trebuild.issues.push(issue);\n\t\t\tif (fill !== void 0) rebuild.temporaryValues[added.name] = {\n\t\t\t\tkind: \"sql\",\n\t\t\t\tsql: fill\n\t\t\t};\n\t\t\trebuild.classes.push(\"additive\");\n\t\t\tconsumed.add(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tconst cls = classifyNodeIssue(issue, ctx);\n\t\tif (!cls) continue;\n\t\tconst rebuild = rebuildOf(tableName);\n\t\trebuild.issues.push(issue);\n\t\tconsumed.add(issue);\n\t\tif (cls === \"widening\") {\n\t\t\trebuild.classes.push(\"widening\");\n\t\t\tcontinue;\n\t\t}\n\t\tconst column = columnNameOf(issue);\n\t\tconst converted = statementColumn(ctx, \"convert\", tableName, column);\n\t\trebuild.retypedColumns.push(column);\n\t\tif (converted === void 0) {\n\t\t\trebuild.classes.push(\"destructive\");\n\t\t\tcontinue;\n\t\t}\n\t\trebuild.copyExpressions[column] = {\n\t\t\tkind: \"placeholder\",\n\t\t\tslot: `${converted.text}:convert`\n\t\t};\n\t\trebuild.classes.push(\"data\");\n\t}\n\tfor (const issue of issues) {\n\t\tconst rebuild = byTable.get(issue.path[1] ?? \"\");\n\t\tif (consumed.has(issue) || rebuild === void 0 || addedColumn(issue, ctx) === void 0) continue;\n\t\trebuild.issues.push(issue);\n\t\trebuild.classes.push(\"additive\");\n\t\tconsumed.add(issue);\n\t}\n\tif (byTable.size === 0) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const [tableName, rebuild] of byTable) {\n\t\tconst expectedTable = ctx.expected.tables[tableName];\n\t\tconst actualTable = ctx.actual.tables[tableName];\n\t\tif (!expectedTable || !actualTable) continue;\n\t\tconst leavesColumnsOut = Object.keys(actualTable.columns).some((column) => !Object.hasOwn(expectedTable.columns, column));\n\t\tconst operationClass = highestClass([...rebuild.classes, ...leavesColumnsOut ? [\"destructive\"] : []]);\n\t\tconst tableSpec = tableSpecFromNode(expectedTable);\n\t\tconst indexes = expectedTable.indexes.map((idx) => ({\n\t\t\tname: idx.name,\n\t\t\tcolumns: idx.columns ?? []\n\t\t}));\n\t\tcalls.push(new RecreateTableCall({\n\t\t\ttableName,\n\t\t\tcontractTable: tableSpec,\n\t\t\tschemaColumnNames: [...Object.keys(actualTable.columns), ...rebuild.addedColumns],\n\t\t\tindexes,\n\t\t\tsummary: buildRecreateSummary(tableName, rebuild.issues),\n\t\t\tpostchecks: [...buildRecreatePostchecks(tableName, rebuild.issues, tableSpec, /* @__PURE__ */ new Set([...Object.keys(rebuild.copyExpressions), ...Object.keys(rebuild.temporaryValues)]), new Set(tableSpec.columns.filter(({ name }) => statementColumn(ctx, \"backfill\", tableName, name) !== void 0).map(({ name }) => name)))],\n\t\t\toperationClass,\n\t\t\tcopyExpressions: rebuild.copyExpressions,\n\t\t\ttemporaryValues: rebuild.temporaryValues,\n\t\t\tretypedColumns: rebuild.retypedColumns\n\t\t}));\n\t}\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !consumed.has(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* Writes the calls that come before the rebuild of a column a `--backfill` statement names: for a\n* required column added to an existing table, the nullable add and a data transform whose slot the\n* user fills; for a column made required, the data transform. The rebuild that makes the column\n* NOT NULL comes from `recreateTableStrategy`, so this strategy consumes no issue. Without the\n* statement, a tightening rebuild fails on a NULL rather than guessing a value for it.\n*/\nconst nullabilityTighteningBackfillStrategy = (issues, ctx) => {\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0 || !isColumnIssue(issue)) continue;\n\t\tconst added = addedRequiredColumn(issue, ctx);\n\t\tconst tightened = issueOutcome(issue) === \"not-equal\" && !columnNode(issue.expected).nullable && columnNode(issue.actual).nullable ? columnNode(issue.expected) : void 0;\n\t\tconst column = added ?? tightened;\n\t\tif (column === void 0) continue;\n\t\tconst named = statementColumn(ctx, \"backfill\", tableName, column.name);\n\t\tif (named === void 0) continue;\n\t\tif (added !== void 0) calls.push(new AddColumnCall(tableName, {\n\t\t\t...columnSpecFromNode(added, false),\n\t\t\tnullable: true\n\t\t}));\n\t\tcalls.push(new DataTransformCall(`data_migration.backfill-${tableName}-${column.name}`, `Backfill NULLs in \"${tableName}\".\"${column.name}\" before NOT NULL tightening`, tableName, column.name, `${named.text}:run`));\n\t}\n\tif (calls.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues,\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\nconst sqlitePlannerStrategies = [nullabilityTighteningBackfillStrategy, recreateTableStrategy];\n//#endregion\n//#region src/core/migrations/issue-planner.ts\n/**\n* The generic differ is total: a missing/extra table (or column) emits an\n* issue for itself AND for every node in its subtree (columns, defaults,\n* constraints, indexes). `CreateTableCall`/`DropTableCall` and\n* `AddColumnCall`/`DropColumnCall` already account for the whole subtree\n* (reading it directly off the table/column node), so the nested issues are\n* redundant — coalescing them is \"the planner's responsibility\" the differ's\n* own contract assigns (`schema-diff.ts`). Drops any issue whose path is a\n* strict descendant of a `not-found`/`not-expected` issue's path.\n*/\nfunction coalesceSubtreeIssues(issues) {\n\tconst collapsingPaths = issues.filter((issue) => issueOutcome(issue) === \"not-found\" || issueOutcome(issue) === \"not-expected\").map((issue) => issue.path);\n\tif (collapsingPaths.length === 0) return issues;\n\treturn issues.filter((issue) => !collapsingPaths.some((ancestor) => isStrictDescendantPath(issue.path, ancestor)));\n}\nfunction isStrictDescendantPath(path, ancestor) {\n\tif (path.length <= ancestor.length) return false;\n\tfor (let i = 0; i < ancestor.length; i += 1) if (path[i] !== ancestor[i]) return false;\n\treturn true;\n}\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/**\n* Builds the flat `SqliteTableSpec` `RecreateTableCall` needs from the\n* expected table node — the node-sourced equivalent of the retired\n* `toTableSpec` (which read a raw contract `StorageTable`). Every column's\n* spec is resolved from its `codecRef` via `columnSpecFromNode`.\n*/\nfunction tableSpecFromNode(table) {\n\tconst columns = Object.values(table.columns).map((c) => columnSpecFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst uniques = table.uniques.map((u) => ({\n\t\tcolumns: u.columns,\n\t\t...u.name !== void 0 ? { name: u.name } : {}\n\t}));\n\tconst foreignKeys = table.foreignKeys.map((fk) => ({\n\t\tcolumns: fk.columns,\n\t\treferences: {\n\t\t\ttable: fk.referencedTable,\n\t\t\tcolumns: fk.referencedColumns\n\t\t},\n\t\t...fk.name !== void 0 ? { name: fk.name } : {},\n\t\t...fk.onDelete !== void 0 ? { onDelete: fk.onDelete } : {},\n\t\t...fk.onUpdate !== void 0 ? { onUpdate: fk.onUpdate } : {}\n\t}));\n\treturn {\n\t\tcolumns,\n\t\t...table.primaryKey ? { primaryKey: { columns: table.primaryKey.columns } } : {},\n\t\tuniques,\n\t\tforeignKeys\n\t};\n}\nfunction issueConflict(kind, summary, location) {\n\treturn {\n\t\tkind,\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\t...location ? { location } : {}\n\t};\n}\nfunction issueLocation(tableName, columnName) {\n\treturn columnName !== void 0 ? {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName,\n\t\tcolumn: columnName\n\t} : {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName\n\t};\n}\n/**\n* Conflict kind for a node kind that `recreateTableStrategy` absorbs for\n* every reachable production issue. Reaching `mapNodeIssueToCall` for one of\n* these means the recreate strategy didn't run — mirrors the legacy\n* `conflictKindForIssue` per-kind categorization.\n*/\nfunction absorbedConflictKind(nodeKind) {\n\tswitch (nodeKind) {\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.unique: return \"indexIncompatible\";\n\t\tcase RelationalSchemaNodeKind.foreignKey: return \"foreignKeyConflict\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\n/**\n* Builds the `CreateTableCall` + per-index `CreateIndexCall`s for a\n* newly-expected table. Reads only the table node's own children — indexes\n* (declared + FK-backing, deduped) are already merged and ordered at\n* derivation (`contractToSchemaIR`'s `convertTable`).\n*/\nfunction buildCreateTableCalls(table) {\n\tconst columns = Object.values(table.columns).map((c) => ddlColumnFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst constraints = tableConstraintsFromNode(table, Object.values(table.columns).some((c) => isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst calls = [new CreateTableCall(table.name, columns, constraints.length > 0 ? constraints : void 0)];\n\tfor (const index of table.indexes) {\n\t\tconst indexName = index.name;\n\t\tcalls.push(new CreateIndexCall(table.name, indexName, index.columns ?? []));\n\t}\n\treturn calls;\n}\nfunction mapTableIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return ok(buildCreateTableCalls(blindCast(issue.expected)));\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst table = blindCast(issue.actual);\n\t\tif (CONTROL_TABLE_NAMES.has(table.name)) return ok([]);\n\t\treturn ok([new DropTableCall(table.name)]);\n\t}\n\treturn notOk(issueConflict(\"unsupportedOperation\", `Unexpected table drift: ${issue.path.join(\"/\")}`));\n}\nfunction mapColumnIssue(issue, ctx) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Column issue has no table in its path: ${issue.path.join(\"/\")}`));\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst column = blindCast(issue.expected);\n\t\tconst table = ctx.expected.tables[tableName];\n\t\treturn ok([new AddColumnCall(tableName, columnSpecFromNode(column, table !== void 0 && isInlineAutoincrementPrimaryKeyNode(table, column)))]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropColumnCall(tableName, blindCast(issue.actual).name)]);\n\tconst expected = blindCast(issue.expected);\n\treturn notOk(issueConflict(sqlColumnTypesEqual(expected, blindCast(issue.actual)) ? \"nullabilityConflict\" : \"typeMismatch\", issue.path.join(\"/\"), issueLocation(tableName, expected.name)));\n}\nfunction mapIndexIssue(issue) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Index issue has no table in its path: ${issue.path.join(\"/\")}`));\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst index = blindCast(issue.expected);\n\t\tconst indexName = index.name;\n\t\treturn ok([new CreateIndexCall(tableName, indexName, index.columns ?? [])]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst indexName = blindCast(issue.actual).name;\n\t\treturn ok([new DropIndexCall(tableName, indexName)]);\n\t}\n\treturn notOk(issueConflict(\"indexIncompatible\", issue.path.join(\"/\"), issueLocation(tableName)));\n}\nfunction mapNodeIssueToCall(issue, ctx) {\n\tconst node = issueNode(issue);\n\tif (node === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Issue carries neither an expected nor an actual node: ${issue.path.join(\"/\")}`));\n\tswitch (node.nodeKind) {\n\t\tcase RelationalSchemaNodeKind.table: return mapTableIssue(issue);\n\t\tcase RelationalSchemaNodeKind.column: return mapColumnIssue(issue, ctx);\n\t\tcase RelationalSchemaNodeKind.index: return mapIndexIssue(issue);\n\t\tcase RelationalSchemaNodeKind.columnDefault:\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.foreignKey:\n\t\tcase RelationalSchemaNodeKind.unique: return notOk(issueConflict(absorbedConflictKind(node.nodeKind), issue.path.join(\"/\")));\n\t\tcase RelationalSchemaNodeKind.check: return notOk(issueConflict(\"unsupportedOperation\", `The SQLite target does not support CHECK constraint DDL: ${issue.path.join(\"/\")}`));\n\t\tdefault: return notOk(issueConflict(\"unsupportedOperation\", `Unhandled node kind: ${node.nodeKind}`));\n\t}\n}\nfunction classifyCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createTable\": return \"create-table\";\n\t\tcase \"addColumn\": return \"add-column\";\n\t\tcase \"createIndex\": return \"create-index\";\n\t\tcase \"dropColumn\": return \"drop-column\";\n\t\tcase \"dropIndex\": return \"drop-index\";\n\t\tcase \"dropTable\": return \"drop-table\";\n\t\tcase \"recreateTable\": return null;\n\t\tdefault: return null;\n\t}\n}\nconst DEFAULT_POLICY = { allowedOperationClasses: [\n\t\"additive\",\n\t\"widening\",\n\t\"destructive\",\n\t\"data\"\n] };\nfunction planIssues(options) {\n\tconst policyProvided = options.policy !== void 0;\n\tconst policy = options.policy ?? DEFAULT_POLICY;\n\tconst frameworkComponents = options.frameworkComponents ?? [];\n\tconst context = {\n\t\texpected: options.expected ?? emptySchemaIR(),\n\t\tactual: options.actual ?? emptySchemaIR(),\n\t\tpolicy,\n\t\tframeworkComponents,\n\t\ttypes: sqlTypeLookupsOf(frameworkComponents),\n\t\tstatementColumns: options.statementColumns ?? {\n\t\t\tconvert: [],\n\t\t\tbackfill: []\n\t\t},\n\t\ttakesTemporaryValue: options.takesTemporaryValue ?? (() => true),\n\t\toriginCodecId: options.originCodecId ?? (() => void 0)\n\t};\n\tconst strategies = options.strategies ?? sqlitePlannerStrategies;\n\tlet remaining = options.issues;\n\tconst recipeCalls = [];\n\tconst bucketableCalls = [];\n\tfor (const strategy of strategies) {\n\t\tconst result = strategy(remaining, context);\n\t\tif (result.kind === \"match\") {\n\t\t\tremaining = result.issues;\n\t\t\tif (result.recipe) recipeCalls.push(...result.calls);\n\t\t\telse bucketableCalls.push(...result.calls);\n\t\t}\n\t}\n\tconst sorted = orderIssuesByDependencies(remaining);\n\tconst defaultCalls = [];\n\tconst conflicts = [];\n\tfor (const issue of sorted) {\n\t\tconst result = mapNodeIssueToCall(issue, context);\n\t\tif (result.ok) defaultCalls.push(...result.value);\n\t\telse conflicts.push(result.failure);\n\t}\n\tconst allowed = policy.allowedOperationClasses;\n\tlet gatedRecipe = recipeCalls;\n\tlet gatedBucketable = bucketableCalls;\n\tlet gatedDefault = defaultCalls;\n\tif (policyProvided) {\n\t\tconst sink = (acc) => (call) => {\n\t\t\tif (allowed.includes(call.operationClass)) {\n\t\t\t\tacc.push(call);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconflicts.push(conflictForDisallowedCall(call, allowed));\n\t\t};\n\t\tconst gatedRecipeBucket = [];\n\t\tconst gatedBucketableBucket = [];\n\t\tconst gatedDefaultBucket = [];\n\t\trecipeCalls.forEach(sink(gatedRecipeBucket));\n\t\tbucketableCalls.forEach(sink(gatedBucketableBucket));\n\t\tdefaultCalls.forEach(sink(gatedDefaultBucket));\n\t\tgatedRecipe = gatedRecipeBucket;\n\t\tgatedBucketable = gatedBucketableBucket;\n\t\tgatedDefault = gatedDefaultBucket;\n\t}\n\tif (conflicts.length > 0) return notOk(conflicts);\n\tconst rebuiltIndexes = new Set(gatedRecipe.flatMap((call) => call instanceof RecreateTableCall ? call.indexes.map((index) => indexKey(call.tableName, index.name)) : []));\n\tconst bucketed = [...gatedDefault, ...gatedBucketable];\n\tconst addedBeforeIndexes = new Set(bucketed.flatMap((call) => call instanceof AddColumnCall ? [indexKey(call.tableName, call.columnName)] : []));\n\tconst indexesANewColumn = (call) => {\n\t\tconst live = context.actual.tables[call.tableName];\n\t\treturn live !== void 0 && call.columns.some((column) => live.columns[column] === void 0 && !addedBeforeIndexes.has(indexKey(call.tableName, column)));\n\t};\n\tconst combined = bucketed.filter((call) => !(call instanceof CreateIndexCall) || !indexesANewColumn(call) || !rebuiltIndexes.has(indexKey(call.tableName, call.indexName)));\n\tconst byCategory = (cat) => combined.filter((c) => classifyCall(c) === cat);\n\treturn ok({ calls: [\n\t\t...byCategory(\"create-table\"),\n\t\t...byCategory(\"add-column\"),\n\t\t...byCategory(\"create-index\"),\n\t\t...gatedRecipe,\n\t\t...byCategory(\"drop-column\"),\n\t\t...byCategory(\"drop-index\"),\n\t\t...byCategory(\"drop-table\")\n\t] });\n}\nfunction indexKey(tableName, indexName) {\n\treturn JSON.stringify([tableName, indexName]);\n}\nfunction emptySchemaIR() {\n\treturn new SqlSchemaIR({ tables: {} });\n}\nfunction conflictForDisallowedCall(call, allowed) {\n\tconst summary = `Operation \"${call.label}\" requires class \"${call.operationClass}\", but policy allows only: ${allowed.join(\", \")}`;\n\tconst location = locationForCall(call);\n\treturn {\n\t\tkind: conflictKindForCall(call),\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\trefusedOperationClass: call.operationClass,\n\t\t...location ? { location } : {}\n\t};\n}\nfunction conflictKindForCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createIndex\":\n\t\tcase \"dropIndex\": return \"indexIncompatible\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\nfunction locationForCall(call) {\n\tconst location = {};\n\tif (\"tableName\" in call) {\n\t\tlocation.entityKind = \"table\";\n\t\tlocation.entityName = call.tableName;\n\t}\n\tif (\"columnName\" in call) location.column = call.columnName;\n\tif (\"indexName\" in call) location.index = call.indexName;\n\treturn Object.keys(location).length > 0 ? location : void 0;\n}\n//#endregion\n//#region src/core/migrations/index-replacements.ts\nfunction indexFindings(issues, outcome) {\n\treturn issues.flatMap((issue) => {\n\t\tconst node = issueNode(issue);\n\t\tconst tableName = issue.path[1];\n\t\tif (node === void 0 || !SqlIndexIR.is(node) || tableName === void 0) return [];\n\t\treturn issueOutcome(issue) === outcome ? [{\n\t\t\tissue,\n\t\t\tindex: node,\n\t\t\ttableName\n\t\t}] : [];\n\t});\n}\n/**\n* An index on a renamed table whose wire name derives from the table name: the old and the new index share their content hash and differ in name.\n*/\nfunction renamedTableIndex(renamedTables) {\n\treturn (old, replacement) => {\n\t\tconst oldWire = parseWireName(old.index.name);\n\t\tconst replacementWire = parseWireName(replacement.index.name);\n\t\treturn renamedTables.has(old.tableName) && old.tableName === replacement.tableName && oldWire !== void 0 && oldWire.hash === replacementWire?.hash && old.index.name !== replacement.index.name;\n\t};\n}\n/**\n* An index on the renamed column whose wire name derives from the column name: after the rename\n* the old and the new index cover the same columns on the same table and differ in name.\n*/\nfunction renamedColumnIndex(table, column) {\n\treturn (old, replacement) => old.tableName === table && replacement.tableName === table && old.index.name !== replacement.index.name && old.index.expression === void 0 && old.index.where === void 0 && (old.index.columns ?? []).includes(column) && old.index.unique === replacement.index.unique && isArrayEqual(old.index.columns ?? [], replacement.index.columns ?? []);\n}\n/**\n* An index on the same table whose new name SQLite takes for the old one, as after a table renamed by hand. Its content is not compared: the old index must be dropped before the new one can be created whatever either defines, and the new one is created from its own definition.\n*/\nconst indexNameCaseChange = (old, replacement) => old.tableName === replacement.tableName && old.index.name !== replacement.index.name && sqliteIdentifiersCollide(old.index.name, replacement.index.name);\n/**\n* Pairs each index the plan drops with the index that replaces it, and plans every paired drop before every paired create. SQLite cannot rename an index, and it compares index names without regard to the case of ASCII letters, so a replacement whose name differs from the old one only in that case would otherwise collide with it. The paired issues are returned as consumed so the ordinary diff does not plan them again.\n*/\nfunction pairIndexReplacements(issues, matches) {\n\tconst missing = indexFindings(issues, \"not-found\");\n\tconst pairs = indexFindings(issues, \"not-expected\").flatMap((old) => {\n\t\tconst replacement = missing.find((candidate) => matches(old, candidate));\n\t\tif (replacement === void 0) return [];\n\t\tmissing.splice(missing.indexOf(replacement), 1);\n\t\treturn [{\n\t\t\told,\n\t\t\treplacement\n\t\t}];\n\t});\n\tconst replacements = pairs.map(({ old, replacement }) => ({\n\t\tdrop: new DropIndexCall(old.tableName, old.index.name),\n\t\tcreate: new CreateIndexCall(replacement.tableName, replacement.index.name, replacement.index.columns ?? [])\n\t}));\n\treturn {\n\t\treplacements,\n\t\tcalls: indexReplacementCalls(replacements),\n\t\tconsumed: new Set(pairs.flatMap(({ old, replacement }) => [old.issue, replacement.issue]))\n\t};\n}\n//#endregion\n//#region src/core/migrations/schema-tables.ts\n/**\n* The tables of a SQLite schema. SQLite has one namespace, so the namespace id is ignored, and it\n* compares table and column names without regard to the case of ASCII letters.\n*/\nfunction sqliteSchemaTables(schema) {\n\tconst hasTable = (_namespaceId, table) => Object.hasOwn(schema.tables, table);\n\treturn {\n\t\thasTable,\n\t\thasColumn: (_namespaceId, table, column) => Object.hasOwn(schema.tables[table]?.columns ?? {}, column),\n\t\ttablesNamed: (_namespaceId, table) => Object.keys(schema.tables).filter((existing) => sqliteIdentifiersCollide(existing, table)),\n\t\tcolumnsNamed: (_namespaceId, table, column) => Object.keys(schema.tables[table]?.columns ?? {}).filter((existing) => sqliteIdentifiersCollide(existing, column)),\n\t\tnamespacesWithTable: (table) => hasTable(UNBOUND_NAMESPACE_ID, table) ? [UNBOUND_NAMESPACE_ID] : [],\n\t\thasNamespace: (namespaceId) => namespaceId === UNBOUND_NAMESPACE_ID\n\t};\n}\n//#endregion\n//#region src/core/migrations/working-schema.ts\nfunction rewriteRefs(refs, rewrite) {\n\treturn refs?.map(rewrite);\n}\n/**\n* Rewrites the step of `kind` and `id` in a ref that runs through the given table, and the table\n* step itself when `kind` is the table kind.\n*/\nfunction stepRewrite(tableName, kind, fromId, toId) {\n\treturn (ref) => {\n\t\tconst tableStep = ref[1];\n\t\tif (tableStep?.nodeKind !== RelationalSchemaNodeKind.table || tableStep.id !== tableName) return ref;\n\t\treturn ref.map((step, index) => index >= 1 && step.nodeKind === kind && step.id === fromId ? {\n\t\t\tnodeKind: kind,\n\t\t\tid: toId\n\t\t} : step);\n\t};\n}\n/**\n* An index whose definition carries SQL text, an expression or a predicate, keeps its columns as\n* they are: a column named inside the text cannot be renamed here, so the diff plans the index.\n*/\nfunction withIndex(index, name, rewrite, columnName) {\n\tconst columnsFollow = index.expression === void 0 && index.where === void 0;\n\tconst base = {\n\t\tnaming: name === index.name ? namingOf(index.name, index.prefix) : namingOfLiveName(name),\n\t\twhere: index.where,\n\t\tunique: index.unique,\n\t\tpartial: index.partial,\n\t\ttype: index.type,\n\t\toptions: index.options,\n\t\tannotations: index.annotations,\n\t\tdependsOn: rewriteRefs(index.dependsOn, rewrite)\n\t};\n\treturn new SqlIndexIR(index.expression !== void 0 ? {\n\t\t...base,\n\t\texpression: index.expression\n\t} : {\n\t\t...base,\n\t\tcolumns: (index.columns ?? []).map(columnsFollow ? columnName : (c) => c)\n\t});\n}\nfunction rebuildTable(table, edit, rewrite) {\n\tconst { primaryKey } = table;\n\tconst { columnName } = edit;\n\treturn new SqlTableIR({\n\t\tname: edit.name,\n\t\tcolumns: Object.fromEntries(Object.values(table.columns).map((column) => {\n\t\t\tconst name = columnName(column.name);\n\t\t\treturn [name, name === column.name ? column : column.withName(name)];\n\t\t})),\n\t\t...ifDefined(\"primaryKey\", primaryKey === void 0 ? void 0 : new PrimaryKey({\n\t\t\tcolumns: primaryKey.columns.map(columnName),\n\t\t\t...ifDefined(\"name\", primaryKey.name),\n\t\t\t...ifDefined(\"dependsOn\", rewriteRefs(primaryKey.dependsOn, rewrite))\n\t\t})),\n\t\tuniques: table.uniques.map((unique) => new SqlUniqueIR({\n\t\t\tcolumns: unique.columns.map(columnName),\n\t\t\t...ifDefined(\"name\", unique.name),\n\t\t\t...ifDefined(\"annotations\", unique.annotations),\n\t\t\t...ifDefined(\"dependsOn\", rewriteRefs(unique.dependsOn, rewrite))\n\t\t})),\n\t\tforeignKeys: table.foreignKeys.map((fk) => new SqlForeignKeyIR({\n\t\t\tcolumns: fk.columns.map(columnName),\n\t\t\treferencedTable: edit.referencedTable(fk),\n\t\t\treferencedColumns: edit.referencedColumns(fk),\n\t\t\t...ifDefined(\"referencedSchema\", fk.referencedSchema),\n\t\t\t...ifDefined(\"name\", fk.name),\n\t\t\t...ifDefined(\"onDelete\", fk.onDelete),\n\t\t\t...ifDefined(\"onUpdate\", fk.onUpdate),\n\t\t\t...ifDefined(\"annotations\", fk.annotations),\n\t\t\t...ifDefined(\"resolvedReferencedNamespace\", fk.resolvedReferencedNamespace),\n\t\t\t...ifDefined(\"dependsOn\", rewriteRefs(fk.dependsOn, rewrite))\n\t\t})),\n\t\tindexes: table.indexes.map((index) => withIndex(index, edit.indexName(index), rewrite, columnName)),\n\t\t...ifDefined(\"checks\", table.checks?.map((check) => new SqlCheckConstraintIR({\n\t\t\tnaming: namingOf(check.name, check.prefix),\n\t\t\texpression: check.expression,\n\t\t\tdependsOn: rewriteRefs(check.dependsOn, rewrite)\n\t\t}))),\n\t\t...ifDefined(\"annotations\", table.annotations)\n\t});\n}\n/** Rebuilds every table: `editFor` returns the edit for a table, or `undefined` to keep it. */\nfunction mapTables(schema, rewrite, editFor) {\n\treturn new SqlSchemaIR({\n\t\ttables: Object.fromEntries(Object.values(schema.tables).map((table) => {\n\t\t\tconst rebuilt = rebuildTable(table, {\n\t\t\t\tname: table.name,\n\t\t\t\tcolumnName: (column) => column,\n\t\t\t\treferencedTable: (fk) => fk.referencedTable,\n\t\t\t\treferencedColumns: (fk) => fk.referencedColumns,\n\t\t\t\tindexName: (index) => index.name,\n\t\t\t\t...editFor(table)\n\t\t\t}, rewrite);\n\t\t\treturn [rebuilt.name, rebuilt];\n\t\t})),\n\t\t...ifDefined(\"annotations\", schema.annotations)\n\t});\n}\n/**\n* The schema with one table under its new name. Foreign keys anywhere that reference the table\n* follow it, and every dependency that names it moves with it. Object names do not change. An\n* unnamed primary key, unique constraint or foreign key stays unnamed: SQLite gives such a\n* constraint no name, so an introspected schema has none either, and the planner never renames\n* one.\n*/\nfunction renameTableInSqliteSchema(schema, rename) {\n\tconst { from, to } = rename;\n\treturn mapTables(schema, stepRewrite(from, RelationalSchemaNodeKind.table, from, to), (table) => ({\n\t\t...table.name === from ? { name: to } : {},\n\t\treferencedTable: (fk) => fk.referencedTable === from ? to : fk.referencedTable\n\t}));\n}\n/**\n* The schema with one column under its new name. The table's primary key, unique constraints,\n* foreign keys and plain column indexes name it under the new name, foreign keys anywhere that\n* reference it follow it, and every dependency that names it moves with it. An index with an\n* expression or a predicate keeps its SQL text, and index names do not change, as in SQLite.\n*/\nfunction renameColumnInSqliteSchema(schema, rename) {\n\tconst { table: tableName, from, to } = rename;\n\tconst rewrite = stepRewrite(tableName, RelationalSchemaNodeKind.column, `column:${from}`, `column:${to}`);\n\tconst renamed = (column) => column === from ? to : column;\n\treturn mapTables(schema, rewrite, (table) => ({\n\t\t...table.name === tableName ? { columnName: renamed } : {},\n\t\treferencedColumns: (fk) => fk.referencedTable === tableName ? fk.referencedColumns.map(renamed) : fk.referencedColumns\n\t}));\n}\nfunction replaceIndex(schema, replacement) {\n\tconst { tableName, indexName: oldIndexName } = replacement.drop;\n\tconst newIndexName = replacement.create.indexName;\n\treturn mapTables(schema, stepRewrite(tableName, RelationalSchemaNodeKind.index, `index:${oldIndexName}`, `index:${newIndexName}`), (table) => table.name === tableName ? { indexName: (index) => index.name === oldIndexName ? newIndexName : index.name } : void 0);\n}\n/** The working schema of a plan or a migration, starting from `initial`. */\nfunction createWorkingSchema(initial) {\n\treturn new WorkingSchemaImpl(initial);\n}\nvar WorkingSchemaImpl = class {\n\t#current;\n\tconstructor(initial) {\n\t\tthis.#current = initial;\n\t}\n\tget current() {\n\t\treturn this.#current;\n\t}\n\tapply(call) {\n\t\tconst renamed = call instanceof RenameColumnCall ? renameColumnInSqliteSchema(this.#current, {\n\t\t\ttable: call.tableName,\n\t\t\tfrom: call.oldColumnName,\n\t\t\tto: call.columnName\n\t\t}) : renameTableInSqliteSchema(this.#current, {\n\t\t\tfrom: call.oldTableName,\n\t\t\tto: call.tableName\n\t\t});\n\t\tthis.#current = call.indexReplacements.reduce(replaceIndex, renamed);\n\t}\n};\n//#endregion\n//#region src/core/migrations/table-rename-calls.ts\n/** The SQL a user runs against the database to rename the table by hand. */\nfunction renameTableByHandStatements(rename) {\n\treturn renameTableSteps(rename.from, rename.to).map((renameStep) => renameStep.sql);\n}\n/** The `renameTable` call a user writes in `migration.ts` for `rename`; SQLite has no namespaces. */\nfunction renderRenameTableCall(rename) {\n\treturn new RenameTableCall(rename.from, rename.to, []).renderTypeScript();\n}\n/** How a user renames a table by hand on SQLite. */\nconst sqliteTableRenameByHand = {\n\trenderTableRename: renderRenameTableCall,\n\ttableRenameByHand: renameTableByHandStatements\n};\n/**\n* The call that renames a table, carrying as companions a drop and a create under the new name of\n* each index whose wire name derives from the old table name, since SQLite cannot rename an index.\n* `previous` is the schema with the table under its old name; the renamed copy is diffed against\n* `contract`. SQLite names no primary key, unique constraint or foreign key the contract leaves\n* unnamed, so those need nothing.\n*/\nfunction sqliteTableRenameCall(input) {\n\tconst { from, to } = input.rename;\n\tconst { issues } = buildSqlitePlanDiff({\n\t\tcontract: input.contract,\n\t\tactualSchema: renameTableInSqliteSchema(input.previous, {\n\t\t\tfrom,\n\t\t\tto\n\t\t}),\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst { replacements } = pairIndexReplacements(coalesceSubtreeIssues(issues), renamedTableIndex(/* @__PURE__ */ new Set([to])));\n\treturn new RenameTableCall(from, to, replacements);\n}\n/**\n* The call that renames a column, carrying as companions a drop and a create under the new name of\n* each index on the column whose wire name derives from the column name, since SQLite cannot rename\n* an index and keeps the old name when it renames the column. `previous` is the schema with the\n* column under its old name; the renamed copy is diffed against `contract`.\n*/\nfunction sqliteColumnRenameCall(input) {\n\tconst { table, from, to } = input.rename;\n\tconst { issues } = buildSqlitePlanDiff({\n\t\tcontract: input.contract,\n\t\tactualSchema: renameColumnInSqliteSchema(input.previous, {\n\t\t\ttable,\n\t\t\tfrom,\n\t\t\tto\n\t\t}),\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst { replacements } = pairIndexReplacements(coalesceSubtreeIssues(issues), renamedColumnIndex(table, to));\n\treturn new RenameColumnCall(table, from, to, replacements);\n}\n//#endregion\n//#region src/core/migrations/sqlite-migration.ts\n/**\n* Target-owned base class for SQLite migrations. Fixes the `SqlMigration`\n* generic to `SqlitePlanTargetDetails` and the abstract `targetId` to the\n* SQLite literal, so both user-authored migrations and renderer-generated\n* scaffolds can extend `SqliteMigration` directly without redeclaring\n* target-local identity.\n*\n* The constructor materializes a single SQLite `SqlControlAdapter` from\n* `stack.adapter.create(stack)` and stores it; the protected instance methods\n* forward to the corresponding `*Call` with that stored adapter, so user\n* migrations can write `this.createTable({...})` without threading the adapter\n* through every call.\n*\n* Binds the framework base's `Start` / `End` contract generics so a subclass\n* that assigns its snapshot-store `contract.json` imports to\n* `startContractJson` / `endContractJson` gets fully-typed view accessors:\n* `this.endContract` is a `SqliteContractView<End>`\n* (sole namespace unwrapped to the root — `this.endContract.table.<name>`),\n* built lazily from the JSON fields via the shared `MigrationContractViews`\n* helper. Mirrors `MongoMigration`'s view getters; the framework base derives\n* `describe()` from the same JSON.\n*/\nvar SqliteMigration = class extends Migration {\n\ttargetId = \"sqlite\";\n\t/**\n\t* Materialized SQLite control adapter, created once per migration\n\t* instance from the injected stack. `undefined` only when the migration\n\t* was instantiated without a stack (test fixtures); `controlAdapterFor`\n\t* throws a MIGRATION.SQLITE_CONTROL_STACK_MISSING in that case to surface the misuse.\n\t*/\n\tcontrolAdapter;\n\t#endView = new MigrationContractViews(this, \"SqliteMigration\", (json) => SqliteContractView.fromJson(json));\n\t/** The rename calls this read of `operations` has made so far, in order. */\n\t#renames = [];\n\t#startView = new MigrationContractViews(this, \"SqliteMigration\", (json) => SqliteContractView.fromJson(json));\n\tconstructor(stack) {\n\t\tsuper(stack);\n\t\tthis.controlAdapter = stack?.adapter ? blindCast(stack.adapter.create(stack)) : void 0;\n\t}\n\tframeworkComponents() {\n\t\tconst stack = this.stack;\n\t\tif (stack === void 0) return [];\n\t\treturn [\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t];\n\t}\n\t/** The codec `codecRef` names, built from the stack's codecs; a codec needs a stack. */\n\tstoredValueCodec(operation, codecRef) {\n\t\tif (codecRef === void 0) return void 0;\n\t\tthis.controlAdapterFor(operation);\n\t\treturn {\n\t\t\tcodecRef,\n\t\t\tcodecs: sqlTypeLookupsOf(this.frameworkComponents()).codecLookup\n\t\t};\n\t}\n\t/**\n\t* Returns the materialized control adapter, or throws a MIGRATION.SQLITE_CONTROL_STACK_MISSING naming\n\t* `operation` when the migration was constructed without a `ControlStack`.\n\t* Single home for the null-check that every DDL/DML method shares.\n\t*/\n\tcontrolAdapterFor(operation) {\n\t\tif (!this.controlAdapter) throw errorSqliteMigrationStackMissing(operation);\n\t\treturn this.controlAdapter;\n\t}\n\t/**\n\t* The typed SQLite view over this migration's end-state contract — sole\n\t* namespace unwrapped to the root, so `this.endContract.table.<name>` etc.\n\t* Throws if no `endContractJson` was provided.\n\t*/\n\tget endContract() {\n\t\treturn this.#endView.endContract;\n\t}\n\t/**\n\t* The typed SQLite view over this migration's start-state contract, or\n\t* `null` for a baseline migration (no `startContractJson`).\n\t*/\n\tget startContract() {\n\t\treturn this.#startView.startContract;\n\t}\n\tcreateTable(options) {\n\t\treturn new CreateTableCall(options.table, options.columns, options.constraints).toOp(this.controlAdapterFor(\"createTable\"));\n\t}\n\tdropTable(options) {\n\t\treturn new DropTableCall(options.table).toOp(this.controlAdapterFor(\"dropTable\"));\n\t}\n\t/**\n\t* Emit the operations that rename a table: the table rename, then a drop and a create under the\n\t* new name of each index whose name was derived from the old table name. The old name is resolved\n\t* against the schema as this migration's earlier `renameTable` calls leave it, and the new name\n\t* against the end contract. Spread the result into `operations`:\n\t* `...this.renameTable({ table: 'userProfile', to: 'UserProfile' })`. Throws\n\t* `MIGRATION.TABLE_RENAME_UNMATCHED` when the table does not exist at that point of the migration\n\t* or the end contract lacks the new name.\n\t*/\n\trenameTable(options) {\n\t\tconst adapter = this.controlAdapterFor(\"renameTable\");\n\t\tconst rename = {\n\t\t\tnamespaceId: void 0,\n\t\t\tfrom: options.table,\n\t\t\tto: options.to\n\t\t};\n\t\tconst startContract = this.startContract;\n\t\tif (startContract === null) throw unmatchedTableRename(rename, \"the migration has no start contract\");\n\t\tconst current = this.schemaAfterRenames(startContract);\n\t\tconst endContract = this.endContract;\n\t\tconst resolved = resolveTableRenameAgainst(sqliteSchemaTables(current), endContract, rename);\n\t\tif (!resolved.ok) throw resolved.failure;\n\t\tconst call = sqliteTableRenameCall({\n\t\t\tprevious: current,\n\t\t\tcontract: endContract,\n\t\t\trename: resolved.value,\n\t\t\tframeworkComponents: this.frameworkComponents()\n\t\t});\n\t\tthis.#renames.push(call);\n\t\treturn call.toOps(adapter);\n\t}\n\t/**\n\t* Emit the operations that rename a column: the column rename, then a drop and a create under\n\t* the new name of each index on the column whose name was derived from the old column name. The\n\t* column is resolved against the schema as this migration's earlier rename calls leave it, so a\n\t* column of a table an earlier `renameTable` renamed is named on the table's new name. Spread the\n\t* result into `operations`: `...this.renameColumn({ table: 'User', column: 'name', to:\n\t* 'fullName' })`. Throws `MIGRATION.COLUMN_RENAME_UNMATCHED` when the table or column does not\n\t* exist at that point of the migration, the table already has the new column, or the end\n\t* contract lacks it.\n\t*/\n\trenameColumn(options) {\n\t\tconst adapter = this.controlAdapterFor(\"renameColumn\");\n\t\tconst rename = {\n\t\t\tnamespaceId: void 0,\n\t\t\ttable: options.table,\n\t\t\tfrom: options.column,\n\t\t\tto: options.to\n\t\t};\n\t\tconst startContract = this.startContract;\n\t\tif (startContract === null) throw unmatchedColumnRename(rename, \"the migration has no start contract\");\n\t\tconst current = this.schemaAfterRenames(startContract);\n\t\tconst resolved = resolveColumnRenameAgainst(sqliteSchemaTables(current), this.endContract, rename);\n\t\tif (!resolved.ok) throw resolved.failure;\n\t\tconst call = sqliteColumnRenameCall({\n\t\t\tprevious: current,\n\t\t\tcontract: this.endContract,\n\t\t\trename: resolved.value,\n\t\t\tframeworkComponents: this.frameworkComponents()\n\t\t});\n\t\tthis.#renames.push(call);\n\t\treturn call.toOps(adapter);\n\t}\n\t/** The start contract's schema with this read's rename calls applied in order. */\n\tschemaAfterRenames(startContract) {\n\t\tconst working = createWorkingSchema(sqliteContractToSchema(startContract, sqlTypeLookupsOf(this.frameworkComponents())));\n\t\tfor (const call of this.#renames) working.apply(call);\n\t\treturn working.current;\n\t}\n\tbeginOperationsRead() {\n\t\tthis.#renames = [];\n\t}\n\taddColumn(options) {\n\t\treturn new AddColumnCall(options.table, columnSpecOf(options.column, \"addColumn\", options.table)).toOp(this.controlAdapterFor(\"addColumn\"));\n\t}\n\tdropColumn(options) {\n\t\treturn new DropColumnCall(options.table, options.column).toOp(this.controlAdapterFor(\"dropColumn\"));\n\t}\n\t/**\n\t* Emit an `UPDATE` operation that changes the stored value `from` to `to` in `column`, in every row that holds it. Values are stored values, as the column's codec writes them, and are passed as parameters. Without `codecRef`, pass each value in the form the column stores it, or no row matches.\n\t*/\n\treplaceStoredValue(options) {\n\t\treturn new ReplaceStoredValueCall(options.table, options.column, options.from, options.to, this.storedValueCodec(\"replaceStoredValue\", options.codecRef)).toOp();\n\t}\n\t/**\n\t* Emit an `UPDATE` operation that sets `column` to NULL in every row that holds the stored value `value`. On a column that takes no NULL, its check fails while any row holds the value. The operation is destructive.\n\t*/\n\tremoveStoredValue(options) {\n\t\treturn new RemoveStoredValueCall(options.table, options.column, options.value, this.storedValueCodec(\"removeStoredValue\", options.codecRef), options.enumValue).toOp();\n\t}\n\tcreateIndex(options) {\n\t\treturn new CreateIndexCall(options.table, options.index, options.columns).toOp(this.controlAdapterFor(\"createIndex\"));\n\t}\n\tdropIndex(options) {\n\t\treturn new DropIndexCall(options.table, options.index).toOp(this.controlAdapterFor(\"dropIndex\"));\n\t}\n\trecreateTable(options) {\n\t\tconst { copyExpressions, temporaryValues, ...args } = options;\n\t\treturn new RecreateTableCall({\n\t\t\t...args,\n\t\t\tcontractTable: {\n\t\t\t\t...options.contractTable,\n\t\t\t\tcolumns: options.contractTable.columns.map((column) => columnSpecOf(column, \"recreateTable\", options.tableName))\n\t\t\t},\n\t\t\t...ifDefined(\"copyExpressions\", copyExpressions === void 0 ? void 0 : copyExpressionSlotsOf(copyExpressions, options.tableName)),\n\t\t\t...ifDefined(\"temporaryValues\", temporaryValues === void 0 ? void 0 : copyExpressionSlotsOf(temporaryValues, options.tableName, \"temporaryValues\"))\n\t\t}).toOp(this.controlAdapterFor(\"recreateTable\"));\n\t}\n};\nfunction columnDefaultOf(columnDefault, what) {\n\treturn columnDefault.kind === \"function\" ? {\n\t\tkind: \"function\",\n\t\texpression: sqlTextOf(columnDefault.expression, what)\n\t} : columnDefault;\n}\nfunction columnSpecOf(column, operation, table) {\n\tconst { default: columnDefault, ...rest } = column;\n\tconst what = `${operation} ${JSON.stringify(table)}.${JSON.stringify(column.name)} default`;\n\treturn {\n\t\t...rest,\n\t\t...ifDefined(\"default\", columnDefault === void 0 ? void 0 : columnDefaultOf(columnDefault, what))\n\t};\n}\nfunction copyExpressionSlotsOf(copyExpressions, table, option = \"copyExpressions\") {\n\treturn Object.fromEntries(Object.entries(copyExpressions).map(([column, expression]) => [column, {\n\t\tkind: \"sql\",\n\t\tsql: sqlTextOf(expression, `recreateTable ${JSON.stringify(table)} ${option}.${column}`)\n\t}]));\n}\n//#endregion\nexport { diffSqliteSchema as _, sqliteTableRenameByHand as a, verifySqliteDatabaseSchema as b, sqliteSchemaTables as c, coalesceSubtreeIssues as d, conflictForDisallowedCall as f, buildSqlitePlanDiff as g, sqlitePlannerStrategies as h, sqliteColumnRenameCall as i, indexNameCaseChange as l, planIssues as m, renameTableByHandStatements as n, sqliteTableRenameCall as o, issueNode as p, renderRenameTableCall as r, createWorkingSchema as s, SqliteMigration as t, pairIndexReplacements as u, sqliteActualSchema as v, sqliteContractToSchema as y };\n\n//# sourceMappingURL=sqlite-migration-B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D;AACA,SAAS,sBAAsB,iBAAiB,OAAO,SAAS,mBAAmB;CAClF,OAAO,OAAO,YAAY,OAAO,QAAQ,eAAe,CAAC,CAAC,KAAK,CAAC,QAAQ,gBAAgB,CAAC,QAAQ;EAChG,MAAM;EACN,KAAK,UAAU,YAAY,iBAAiB,KAAK,UAAU,KAAK,EAAE,GAAG,OAAO,GAAG,QAAQ;CACxF,CAAC,CAAC,CAAC;AACJ"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as quoteIdentifier } from "./sql-utils-XGT5Esi2-Zr2mqJf8.mjs";
|
|
4
|
-
import { createDataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
1
|
+
import { c as sqliteError } from "./errors-D9vZNPSI-DoNmdfv7.mjs";
|
|
2
|
+
import { r as quoteIdentifier } from "./sql-utils-C9blmi9x-B90QedVA.mjs";
|
|
5
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
6
4
|
import { UNBOUND_NAMESPACE_ID, freezeNode, hydrateNamespaceEntities } from "@prisma/orm-framework/components/ir";
|
|
7
5
|
import { SqlNamespaceBase } from "@prisma/orm-family-sql/contract/types";
|
|
8
|
-
import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
|
|
9
6
|
import { tableEntityKind } from "@prisma/orm-family-sql/contract/entity-kinds";
|
|
10
|
-
|
|
11
|
-
//#region ../../../3-targets/sqlite/1-target/dist/sqlite-contract-view-CGfiGvKH.mjs
|
|
7
|
+
//#region ../../../3-targets/sqlite/1-target/dist/sqlite-unbound-database-Df3Wf5ZA.mjs
|
|
12
8
|
const SQLITE_NAMESPACE_KIND = "sqlite-namespace";
|
|
13
9
|
/**
|
|
14
10
|
* SQLite namespace concretion carrying table metadata under
|
|
@@ -108,47 +104,7 @@ function buildSqliteNamespace(input) {
|
|
|
108
104
|
function sqliteCreateNamespace(input) {
|
|
109
105
|
return buildSqliteNamespace(input);
|
|
110
106
|
}
|
|
111
|
-
/**
|
|
112
|
-
* SQLite target `ContractSerializer` concretion. Mirrors the Postgres
|
|
113
|
-
* shape: inherits the full SQL-family deserialization pipeline and
|
|
114
|
-
* materialises namespace entries as SQLite database concretions that
|
|
115
|
-
* expose `qualifyTable()` for runtime SQL rendering.
|
|
116
|
-
*/
|
|
117
|
-
var SqliteContractSerializer = class extends SqlContractSerializerBase {
|
|
118
|
-
constructor() {
|
|
119
|
-
super(/* @__PURE__ */ new Map(), [], createDataTypeLookup(sqliteDataTypes));
|
|
120
|
-
}
|
|
121
|
-
hydrateSqlNamespaceEntry(nsId, raw) {
|
|
122
|
-
return buildSqliteNamespace(blindCast(super.hydrateSqlNamespaceEntry(nsId, raw)));
|
|
123
|
-
}
|
|
124
|
-
serializeContract(contract) {
|
|
125
|
-
const { storage, ...rest } = contract;
|
|
126
|
-
const namespacesJson = {};
|
|
127
|
-
for (const [nsId, ns] of Object.entries(storage.namespaces)) namespacesJson[nsId] = {
|
|
128
|
-
id: ns.id,
|
|
129
|
-
entries: this.serializeNamespaceEntries(ns.entries)
|
|
130
|
-
};
|
|
131
|
-
return blindCast({
|
|
132
|
-
...rest,
|
|
133
|
-
storage: {
|
|
134
|
-
storageHash: String(storage.storageHash),
|
|
135
|
-
namespaces: namespacesJson,
|
|
136
|
-
...storage.types !== void 0 ? { types: this.serializeJsonObject(storage.types) } : {}
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
const SqliteContractView = {
|
|
142
|
-
/** Wrap an already-deserialized SQLite contract in a view. */
|
|
143
|
-
from(contract) {
|
|
144
|
-
return buildSqlSingleNamespaceView(contract);
|
|
145
|
-
},
|
|
146
|
-
/** Deserialize a SQLite contract JSON envelope and wrap it in a view. */
|
|
147
|
-
fromJson(json) {
|
|
148
|
-
return buildSqlSingleNamespaceView(new SqliteContractSerializer().deserializeContract(json));
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
107
|
//#endregion
|
|
152
|
-
export {
|
|
108
|
+
export { buildSqliteNamespace as n, sqliteCreateNamespace as r, SqliteUnboundDatabase as t };
|
|
153
109
|
|
|
154
|
-
//# sourceMappingURL=sqlite-
|
|
110
|
+
//# sourceMappingURL=sqlite-unbound-database-Df3Wf5ZA-B1QemRgb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-unbound-database-Df3Wf5ZA-B1QemRgb.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/sqlite-unbound-database-Df3Wf5ZA.mjs"],"sourcesContent":["import { c as sqliteError } from \"./errors-D9vZNPSI.mjs\";\nimport { r as quoteIdentifier } from \"./sql-utils-C9blmi9x.mjs\";\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 { tableEntityKind } from \"@internal/sql-contract/entity-kinds\";\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\nexport { buildSqliteNamespace as n, sqliteCreateNamespace as r, SqliteUnboundDatabase as t };\n\n//# sourceMappingURL=sqlite-unbound-database-Df3Wf5ZA.mjs.map"],"mappings":";;;;;;;AAOA,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,QA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AAC;AACF;;;;;;;;;;;AAWA,SAAS,sBAAsB,OAAO;CACrC,OAAO,qBAAqB,KAAK;AAClC"}
|
package/dist/target.d.mts
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { a as SqliteCodecOptions, c as isSqliteCodecDescriptor, i as SqliteCodecDescriptorRegistry, l as sqliteCodec, n as AnySqliteCodecDescriptor, o as buildSqliteCodecDescriptorRegistry, r as SqliteCodecDescriptor, s as defineSqliteCodecs, t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-DuW-d9ef-BBRBN0Ri.mjs";
|
|
2
2
|
import "./codec-descriptor-C16gQAdS.mjs";
|
|
3
|
-
import { a as
|
|
4
|
-
import { C as sqliteJsonColumn,
|
|
5
|
-
import "./codecs-
|
|
3
|
+
import { _ as SQL_FLOAT_CODEC_ID, a as SQLITE_DATETIME_STRING_CODEC_ID, b as SQL_VARCHAR_CODEC_ID, c as SQLITE_DATE_TEMPORAL_CODEC_ID, d as SQLITE_JSON_CODEC_ID, f as SQLITE_REAL_CODEC_ID, g as SQL_CHAR_CODEC_ID, h as SQLITE_TIME_TEMPORAL_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, l as SQLITE_DURATION_STRING_CODEC_ID, m as SQLITE_TIME_STRING_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_DATETIME_TEMPORAL_CODEC_ID, p as SQLITE_TEXT_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_DATE_STRING_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_INTEGER_CODEC_ID, v as SQL_INT_CODEC_ID, y as SQL_RAW_CODEC_ID } from "./codec-ids-BElbEYb_-CeWfv5bC.mjs";
|
|
4
|
+
import { A as sqliteDatetimeColumn, B as sqliteTimeTemporalColumn, C as sqliteBigintColumn, D as sqliteCodecRegistry, E as sqliteCodecDescriptorRegistry, F as sqliteJsonColumn, I as sqliteNowExpressionFor, L as sqliteRealColumn, M as sqliteDatetimeTemporalColumn, N as sqliteDurationStringColumn, O as sqliteDateStringColumn, P as sqliteIntegerColumn, R as sqliteTextColumn, S as jsonDocumentRetag, T as sqliteBlobColumn, _ as SqliteTimeStringDescriptor, a as SqliteBlobDescriptor, b as createSqliteBuiltinCodecLookup, c as SqliteDateTemporalDescriptor, d as SqliteDatetimeTemporalDescriptor, f as SqliteDurationStringDescriptor, g as SqliteTextDescriptor, h as SqliteRealDescriptor, i as SqliteBigintNumberDescriptor, j as sqliteDatetimeStringColumn, k as sqliteDateTemporalColumn, l as SqliteDatetimeDescriptor, m as SqliteJsonDescriptor, n as SQLITE_NOW_EXPRESSION, o as SqliteCodecRegistry, p as SqliteIntegerDescriptor, r as SqliteBigintDescriptor, s as SqliteDateStringDescriptor, t as JsonValue$1, u as SqliteDatetimeStringDescriptor, v as SqliteTimeTemporalDescriptor, w as sqliteBigintNumberColumn, x as createSqliteCodecRegistryWithBuiltins, y as assembleSqliteCodecRegistry, z as sqliteTimeStringColumn } from "./codecs-BqOj4EKm-BaGeNd2m.mjs";
|
|
5
|
+
import "./codecs-DzkRnjjE.mjs";
|
|
6
6
|
import { i as SqliteDdlVisitor, n as SqliteCreateTable, r as SqliteDdlNode, t as AnySqliteDdlNode } from "./nodes-D8EC1yCx-BS-fKla6.mjs";
|
|
7
7
|
import "./ddl-31OBcTco.mjs";
|
|
8
|
-
import { t as CodecTypes } from "./codec-types-
|
|
9
|
-
import "./codec-types-
|
|
10
|
-
import "./codec-ids-
|
|
8
|
+
import { t as CodecTypes } from "./codec-types-CG5ZkqDU-DCx8ZvBg.mjs";
|
|
9
|
+
import "./codec-types-YpVaNlY0.mjs";
|
|
10
|
+
import "./codec-ids-9Fs9p6ST.mjs";
|
|
11
11
|
import { n as quoteIdentifier, t as escapeLiteral } from "./sql-utils-BqHka8P6.mjs";
|
|
12
|
-
import { n as readSqliteDefault, r as sqliteResolveDefault, t as SqliteReportedDefault } from "./default-normalizer-
|
|
13
|
-
import { t as sqliteAggregateDescriptors } from "./aggregates-
|
|
12
|
+
import { n as readSqliteDefault, r as sqliteResolveDefault, t as SqliteReportedDefault } from "./default-normalizer-CtNsZNRZ.mjs";
|
|
13
|
+
import { t as sqliteAggregateDescriptors } from "./aggregates-Bee9csBL.mjs";
|
|
14
14
|
import { a as buildSignMarkerBootstrapQueries, c as datetime, d as jsonText, f as sqliteTable, i as buildControlTableBootstrapQueries, l as indexExistsAst, m as text, n as IndexExistsCheckBuilder, o as columnExistsAst, p as tableExistsAst, r as TableExistsCheckBuilder, s as createTable, t as ColumnExistsCheckBuilder, u as integer } from "./contract-free-IqKgq8Pk.mjs";
|
|
15
15
|
import { n as buildTargetDetails, t as SqlitePlanTargetDetails } from "./planner-target-details-B-qtfkmj-DIGpv7YQ.mjs";
|
|
16
|
-
import {
|
|
16
|
+
import { n as sqliteScalarTypeConstructors } from "./control-DGa_C2q6.mjs";
|
|
17
17
|
import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-DKXLHvMU.mjs";
|
|
18
|
-
import { a as sqliteCharacterVarying, c as
|
|
18
|
+
import { _ as sqliteReal, a as sqliteCharacterVarying, b as sqliteTime, c as sqliteDate, d as sqliteDatetimeText, f as sqliteDatetimeTextAtMilliseconds, g as sqliteJson, h as sqliteInteger, i as sqliteCharacterLengthParams, l as sqliteDateText, m as sqliteDurationText, n as sqliteBlobFromHexText, o as sqliteDataTypeEntries, p as sqliteDuration, r as sqliteCharacter, s as sqliteDataTypes, t as sqliteBlob, u as sqliteDatetime, v as sqliteText, x as sqliteTimeText, y as sqliteTextDataTypes } from "./data-types-CwpMoNK4.mjs";
|
|
19
19
|
import { t as SqliteContractView } from "./sqlite-contract-view-BDw8T5Cp-BfFajhe4.mjs";
|
|
20
20
|
import { t as SqliteMigration } from "./sqlite-migration-CcXBptQr-DlKSNedI.mjs";
|
|
21
21
|
import { a as fn, c as placeholder, d as sql, f as unique, i as dataTransform, l as primaryKey, n as MigrationCLI, o as foreignKey, r as col, s as lit, t as DataTransformOptions, u as rawSql } from "./migration-BHhnGEA2.mjs";
|
|
22
22
|
import { a as DropColumnCall, c as RawSqlCall, d as RenameColumnCall, f as RenameTableCall, i as DataTransformCall, l as RecreateTableCall, m as SqliteOpFactoryCall, n as CreateIndexCall, o as DropIndexCall, p as ReplaceStoredValueCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RemoveStoredValueCall } from "./op-factory-call-B8bJlvkP.mjs";
|
|
23
|
-
import "./pack-
|
|
23
|
+
import "./pack-CwFlRihn.mjs";
|
|
24
24
|
import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-DyUPHRKW-CFtZi2VG.mjs";
|
|
25
25
|
import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-DcOz-1na.mjs";
|
|
26
26
|
import "./planner-produced-sqlite-migration-DxyN096L.mjs";
|
|
27
27
|
import { t as renderOps } from "./render-ops-Wlf_Pawh.mjs";
|
|
28
|
-
import { n as SqliteRuntimeTargetInstance, t as SqliteContractSerializer } from "./runtime-
|
|
29
|
-
|
|
28
|
+
import { n as SqliteRuntimeTargetInstance, r as sqliteNowGenerators, t as SqliteContractSerializer } from "./runtime-ZsuC__oX.mjs";
|
|
29
|
+
import { n as sqliteCreateNamespace, t as SqliteUnboundDatabase } from "./types-COqCbSev.mjs";
|
|
30
|
+
export { type AdaptedSqliteCodecDescriptor, AddColumnCall, type AnySqliteCodecDescriptor, type AnySqliteDdlNode, CONTROL_TABLE_NAMES, CodecTypes, type ColumnExistsCheckBuilder, CreateIndexCall, CreateTableCall, DataTransformCall, type DataTransformOptions, DropColumnCall, DropIndexCall, DropTableCall, type IndexExistsCheckBuilder, type JsonValue$1 as JsonValue, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, RemoveStoredValueCall, RenameColumnCall, RenameTableCall, ReplaceStoredValueCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_DATETIME_STRING_CODEC_ID, SQLITE_DATETIME_TEMPORAL_CODEC_ID, SQLITE_DATE_STRING_CODEC_ID, SQLITE_DATE_TEMPORAL_CODEC_ID, SQLITE_DURATION_STRING_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_NOW_EXPRESSION, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQLITE_TIME_STRING_CODEC_ID, SQLITE_TIME_TEMPORAL_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SqliteBigintDescriptor, type SqliteBigintNumberDescriptor, type SqliteBlobDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, type SqliteCodecRegistry, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, type SqliteDateStringDescriptor, type SqliteDateTemporalDescriptor, type SqliteDatetimeDescriptor, type SqliteDatetimeStringDescriptor, type SqliteDatetimeTemporalDescriptor, SqliteDdlNode, type SqliteDdlVisitor, type SqliteDurationStringDescriptor, type SqliteIntegerDescriptor, type SqliteJsonDescriptor, type SqliteMigrationDestinationInfo, SqliteMigrationPlanner, type SqliteOpFactoryCall, type SqlitePlanResult, type SqlitePlanTargetDetails, type SqliteRealDescriptor, type SqliteReportedDefault, type SqliteRuntimeTargetInstance, type SqliteTextDescriptor, type SqliteTimeStringDescriptor, type SqliteTimeTemporalDescriptor, SqliteUnboundDatabase, type TableExistsCheckBuilder, TypeScriptRenderableSqliteMigration, assembleSqliteCodecRegistry, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, placeholder, primaryKey, quoteIdentifier, rawSql, readSqliteDefault, renderOps, sql, sqliteAggregateDescriptors, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlob, sqliteBlobColumn, sqliteBlobFromHexText, sqliteCharacter, sqliteCharacterLengthParams, sqliteCharacterVarying, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDataTypeEntries, sqliteDataTypes, sqliteDate, sqliteDateStringColumn, sqliteDateTemporalColumn, sqliteDateText, sqliteDatetime, sqliteDatetimeColumn, sqliteDatetimeStringColumn, sqliteDatetimeTemporalColumn, sqliteDatetimeText, sqliteDatetimeTextAtMilliseconds, sqliteDuration, sqliteDurationStringColumn, sqliteDurationText, sqliteInteger, sqliteIntegerColumn, sqliteJson, sqliteJsonColumn, sqliteNowExpressionFor, sqliteNowGenerators, sqliteReal, sqliteRealColumn, sqliteResolveDefault, sqliteScalarTypeConstructors, sqliteTable, sqliteText, sqliteTextColumn, sqliteTextDataTypes, sqliteTime, sqliteTimeStringColumn, sqliteTimeTemporalColumn, sqliteTimeText, tableExistsAst, text, unique };
|