@prisma/orm-target-sqlite 8.0.0-rc.20-dev.7 → 8.0.0-rc.20-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-xs2nBMBo.d.mts → adapter-BHJEOmT6.d.mts} +4 -4
- package/dist/{adapter-xs2nBMBo.d.mts.map → adapter-BHJEOmT6.d.mts.map} +1 -1
- package/dist/{adapter-BBkurVtx-2htTOh4C.mjs → adapter-Cff01Cgi-C19Fhc2M.mjs} +105 -23
- package/dist/adapter-Cff01Cgi-C19Fhc2M.mjs.map +1 -0
- package/dist/adapter.d.mts +2 -2
- package/dist/adapter.mjs +1 -1
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.d.mts +1 -1
- package/dist/adapter__control.mjs +1 -1
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +1 -1
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{aggregates-DC8nyCjN.d.mts → aggregates-CDMoiy_Z.d.mts} +4 -4
- package/dist/{aggregates-DC8nyCjN.d.mts.map → aggregates-CDMoiy_Z.d.mts.map} +1 -1
- package/dist/{contract-free-DetowcoS.mjs → contract-free-CYl1uzJ8.mjs} +2 -2
- package/dist/{contract-free-DetowcoS.mjs.map → contract-free-CYl1uzJ8.mjs.map} +1 -1
- package/dist/{contract-free-BJwIJN6x.d.mts → contract-free-IqKgq8Pk.d.mts} +4 -4
- package/dist/{contract-free-BJwIJN6x.d.mts.map → contract-free-IqKgq8Pk.d.mts.map} +1 -1
- package/dist/{control-B_pSY997.d.mts → control-VMpMSXk9.d.mts} +2 -2
- package/dist/{control-B_pSY997.d.mts.map → control-VMpMSXk9.d.mts.map} +1 -1
- package/dist/{ddl-CX4tAZ-y-Bng-4PWC.mjs → ddl-BoTU7bCZ-CXNSFEtj.mjs} +8 -8
- package/dist/ddl-BoTU7bCZ-CXNSFEtj.mjs.map +1 -0
- package/dist/{migration-BiEvYZud.d.mts → migration-BHhnGEA2.d.mts} +2 -2
- package/dist/{migration-BiEvYZud.d.mts.map → migration-BHhnGEA2.d.mts.map} +1 -1
- package/dist/{migration-wMj4eXHP.mjs → migration-D0UlBTQw.mjs} +2 -2
- package/dist/{migration-wMj4eXHP.mjs.map → migration-D0UlBTQw.mjs.map} +1 -1
- package/dist/{op-factory-call-CbRRVCjr.d.mts → op-factory-call-B8bJlvkP.d.mts} +38 -5
- package/dist/{op-factory-call-CbRRVCjr.d.mts.map → op-factory-call-B8bJlvkP.d.mts.map} +1 -1
- package/dist/{op-factory-call-82mX3jT--BaXeVrFl.mjs → op-factory-call-DADakw8V-yXzHuXlv.mjs} +147 -5
- package/dist/op-factory-call-DADakw8V-yXzHuXlv.mjs.map +1 -0
- package/dist/{pack-B3YrlPJI.d.mts → pack-BT-BNRPc.d.mts} +2 -2
- package/dist/{pack-B3YrlPJI.d.mts.map → pack-BT-BNRPc.d.mts.map} +1 -1
- package/dist/{planner-DpcDL7KV-8viK6ZfF.mjs → planner-1zVd0jR2-mkF3bIWw.mjs} +101 -12
- package/dist/planner-1zVd0jR2-mkF3bIWw.mjs.map +1 -0
- package/dist/{planner-j4kgbkbY.d.mts → planner-DcOz-1na.d.mts} +2 -2
- package/dist/{planner-j4kgbkbY.d.mts.map → planner-DcOz-1na.d.mts.map} +1 -1
- package/dist/{planner-produced-sqlite-migration-DtfUafua-CLIBAR7j.mjs → planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs} +4 -4
- package/dist/{planner-produced-sqlite-migration-DtfUafua-CLIBAR7j.mjs.map → planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs.map} +1 -1
- package/dist/planner-produced-sqlite-migration-DxyN096L.d.mts +1 -0
- package/dist/{planner-produced-sqlite-migration-HnOjnBHx-B_d6P_xk.d.mts → planner-produced-sqlite-migration-DyUPHRKW-CFtZi2VG.d.mts} +3 -3
- package/dist/planner-produced-sqlite-migration-DyUPHRKW-CFtZi2VG.d.mts.map +1 -0
- package/dist/{render-ops-Cf9-hDHa-DFWVF8Hs.mjs → render-ops-CwuscSzF-D3hoxOT_.mjs} +3 -3
- package/dist/{render-ops-Cf9-hDHa-DFWVF8Hs.mjs.map → render-ops-CwuscSzF-D3hoxOT_.mjs.map} +1 -1
- package/dist/{sqlite-migration-Ct0LmmUo-Bo60qjbO.mjs → sqlite-migration-BLyz5GQr-BMImgGTB.mjs} +24 -3
- package/dist/sqlite-migration-BLyz5GQr-BMImgGTB.mjs.map +1 -0
- package/dist/{sqlite-migration-BNHxL3Xy-CGdqsq1O.d.mts → sqlite-migration-CcXBptQr-DlKSNedI.d.mts} +29 -3
- package/dist/sqlite-migration-CcXBptQr-DlKSNedI.d.mts.map +1 -0
- package/dist/target.d.mts +10 -10
- package/dist/target.mjs +9 -9
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__contract-free.d.mts +1 -1
- package/dist/target__contract-free.mjs +2 -2
- package/dist/target__control.mjs +44 -5
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.d.mts +2 -2
- package/dist/target__op-factory-call.mjs +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__planner-produced-sqlite-migration.d.mts +2 -2
- package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/package.json +9 -9
- package/dist/adapter-BBkurVtx-2htTOh4C.mjs.map +0 -1
- package/dist/ddl-CX4tAZ-y-Bng-4PWC.mjs.map +0 -1
- package/dist/op-factory-call-82mX3jT--BaXeVrFl.mjs.map +0 -1
- package/dist/planner-DpcDL7KV-8viK6ZfF.mjs.map +0 -1
- package/dist/planner-produced-sqlite-migration-BkkAIXsc.d.mts +0 -1
- package/dist/planner-produced-sqlite-migration-HnOjnBHx-B_d6P_xk.d.mts.map +0 -1
- package/dist/sqlite-migration-BNHxL3Xy-CGdqsq1O.d.mts.map +0 -1
- package/dist/sqlite-migration-Ct0LmmUo-Bo60qjbO.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID } from "./codec-ids-wgEvkCkg-WltuexMR.mjs";
|
|
2
2
|
import { n as SQLITE_NOW_EXPRESSION } from "./datetime-text-Bniwehv--BSQhnrdE.mjs";
|
|
3
|
-
import { r as createTable } from "./ddl-
|
|
3
|
+
import { r as createTable } from "./ddl-BoTU7bCZ-CXNSFEtj.mjs";
|
|
4
4
|
import { TableSource } from "@prisma/orm-family-sql/relational-core/ast";
|
|
5
5
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
6
6
|
import { col, fn, lit, table } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
@@ -88,4 +88,4 @@ function buildControlTableBootstrapQueries() {
|
|
|
88
88
|
//#endregion
|
|
89
89
|
export { jsonText as a, integer as i, buildSignMarkerBootstrapQueries as n, sqliteTable as o, datetime as r, text as s, buildControlTableBootstrapQueries as t };
|
|
90
90
|
|
|
91
|
-
//# sourceMappingURL=contract-free-
|
|
91
|
+
//# sourceMappingURL=contract-free-CYl1uzJ8.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-free-
|
|
1
|
+
{"version":3,"file":"contract-free-CYl1uzJ8.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/contract-free.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID } from \"./codec-ids-wgEvkCkg.mjs\";\nimport { n as SQLITE_NOW_EXPRESSION } from \"./datetime-text-Bniwehv-.mjs\";\nimport { a as tableExistsAst, i as indexExistsAst, n as columnExistsAst, t as createTable } from \"./ddl-BoTU7bCZ.mjs\";\nimport { TableSource } from \"@internal/sql-relational-core/ast\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit, table } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/columns.ts\nconst desc = (codecId, opts) => ({\n\tcodecId,\n\tnullable: opts?.nullable ?? false\n});\nconst text = (opts) => desc(SQLITE_TEXT_CODEC_ID, opts);\nconst integer = (opts) => desc(SQLITE_INTEGER_CODEC_ID, opts);\nconst jsonText = (opts) => desc(SQLITE_JSON_CODEC_ID, opts);\nconst datetime = (opts) => desc(SQLITE_DATETIME_CODEC_ID, opts);\n/**\n* Declare a SQLite control-plane table with a typed column schema. SQLite tables\n* are addressed by a flat name (no schema prefix).\n*\n* ```ts\n* const marker = sqliteTable('_prisma_marker', {\n* space: text(),\n* core_hash: text(),\n* updated_at: datetime(),\n* });\n* ```\n*/\nfunction sqliteTable(name, columns) {\n\treturn table(TableSource.named(name), columns);\n}\n//#endregion\n//#region src/contract-free/control-bootstrap.ts\nconst markerColumns = [\n\tcol(\"space\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true,\n\t\tdefault: lit(APP_SPACE_ID)\n\t}),\n\tcol(\"core_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"profile_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"contract_json\", \"TEXT\"),\n\tcol(\"canonical_version\", \"INTEGER\"),\n\tcol(\"updated_at\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: fn(SQLITE_NOW_EXPRESSION)\n\t}),\n\tcol(\"app_tag\", \"TEXT\"),\n\tcol(\"meta\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t}),\n\tcol(\"invariants\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"[]\")\n\t})\n];\nconst ledgerColumns = [\n\tcol(\"id\", \"INTEGER PRIMARY KEY AUTOINCREMENT\"),\n\tcol(\"created_at\", \"TEXT\", {\n\t\tnotNull: true,\n\t\tdefault: fn(SQLITE_NOW_EXPRESSION)\n\t}),\n\tcol(\"space\", \"TEXT\", { notNull: true }),\n\tcol(\"migration_name\", \"TEXT\", { notNull: true }),\n\tcol(\"migration_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"origin_core_hash\", \"TEXT\"),\n\tcol(\"origin_profile_hash\", \"TEXT\"),\n\tcol(\"destination_core_hash\", \"TEXT\", { notNull: true }),\n\tcol(\"destination_profile_hash\", \"TEXT\"),\n\tcol(\"contract_json_before\", \"TEXT\"),\n\tcol(\"contract_json_after\", \"TEXT\"),\n\tcol(\"operations\", \"TEXT\", { notNull: true })\n];\nconst markerTable = createTable({\n\ttable: \"_prisma_marker\",\n\tifNotExists: true,\n\tcolumns: markerColumns\n});\nconst ledgerTable = createTable({\n\ttable: \"_prisma_ledger\",\n\tifNotExists: true,\n\tcolumns: ledgerColumns\n});\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [markerTable];\n}\nfunction buildControlTableBootstrapQueries() {\n\treturn [markerTable, ledgerTable];\n}\n//#endregion\nexport { buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, columnExistsAst, createTable, datetime, indexExistsAst, integer, jsonText, sqliteTable, tableExistsAst, text };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,QAAQ,SAAS,UAAU;CAChC;CACA,UAAU,MAAM,YAAY;AAC7B;AACA,MAAM,QAAQ,SAAS,KAAK,sBAAsB,IAAI;AACtD,MAAM,WAAW,SAAS,KAAK,yBAAyB,IAAI;AAC5D,MAAM,YAAY,SAAS,KAAK,sBAAsB,IAAI;AAC1D,MAAM,YAAY,SAAS,KAAK,0BAA0B,IAAI;;;;;;;;;;;;;AAa9D,SAAS,YAAY,MAAM,SAAS;CACnC,OAAO,MAAM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O,CAAC,WAAW;AACpB;AACA,SAAS,oCAAoC;CAC5C,OAAO,CAAC,aAAa,WAAW;AACjC"}
|
|
@@ -9,7 +9,7 @@ interface ColumnExistsCheckBuilder {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Typed builder for the migration planner's column-existence checks. Produces
|
|
12
|
-
* `SELECT COUNT(*) {=|>} 0 AS "result" FROM pragma_table_info(?) WHERE "name" =
|
|
12
|
+
* `SELECT COUNT(*) {=|>} 0 AS "result" FROM pragma_table_info(?1) WHERE "name" = ?2`
|
|
13
13
|
* ASTs with the table and column names bound as text parameters — never
|
|
14
14
|
* inlined into the SQL.
|
|
15
15
|
*/
|
|
@@ -20,7 +20,7 @@ interface TableExistsCheckBuilder {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Typed builder for table-existence checks over `sqlite_master`.
|
|
23
|
-
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ? AND "name" =
|
|
23
|
+
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ?1 AND "name" = ?2`
|
|
24
24
|
* with the table name and the literal `'table'` bound as text parameters.
|
|
25
25
|
*/
|
|
26
26
|
declare function tableExistsAst(tableName: string): TableExistsCheckBuilder;
|
|
@@ -30,7 +30,7 @@ interface IndexExistsCheckBuilder {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Typed builder for index-existence checks over `sqlite_master`.
|
|
33
|
-
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ? AND "name" =
|
|
33
|
+
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ?1 AND "name" = ?2`
|
|
34
34
|
* with the index name and the literal `'index'` bound as text parameters.
|
|
35
35
|
*/
|
|
36
36
|
declare function indexExistsAst(indexName: string): IndexExistsCheckBuilder;
|
|
@@ -85,4 +85,4 @@ declare function createTable(options: {
|
|
|
85
85
|
}): SqliteCreateTable;
|
|
86
86
|
//#endregion
|
|
87
87
|
export { buildSignMarkerBootstrapQueries as a, datetime as c, jsonText as d, sqliteTable as f, buildControlTableBootstrapQueries as i, indexExistsAst as l, text as m, IndexExistsCheckBuilder as n, columnExistsAst as o, tableExistsAst as p, TableExistsCheckBuilder as r, createTable as s, ColumnExistsCheckBuilder as t, integer as u };
|
|
88
|
-
//# sourceMappingURL=contract-free-
|
|
88
|
+
//# sourceMappingURL=contract-free-IqKgq8Pk.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-free-
|
|
1
|
+
{"version":3,"file":"contract-free-IqKgq8Pk.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/contract-free.d.mts"],"mappings":";;;;;UAIU;EACR,gBAAgB;EAChB,iBAAiB;;;;;;;;iBAQF,gBAAgB,eAAe,iBAAiB;UACvD;EACR,eAAe;EACf,gBAAgB;;;;;;;iBAOD,eAAe,oBAAoB;UAC1C;EACR,eAAe;EACf,gBAAgB;;;;;;;iBAOD,eAAe,oBAAoB;;;KAG/C;WACM;;cAEG,OAAO,OAAO,YAAY;cAC1B,UAAU,OAAO,YAAY;cAC7B,WAAW,OAAO,YAAY;cAC9B,WAAW,OAAO,YAAY;;;;;;;;;;;;;iBAa3B,YAAY,eAAe,cAAc,cAAc,SAAS,SAAS,YAAY;;;iBAGrF,4CAA4C;iBAC5C,8CAA8C;;;;;;;;;;;;;;;;;iBAiB9C,YAAY;WAClB;WACA;WACA;WACA,kBAAkB;WAClB,uBAAuB;IAC9B"}
|
|
@@ -36,7 +36,7 @@ declare class SqliteControlAdapter implements SqlControlAdapter<'sqlite'> {
|
|
|
36
36
|
* Lower an AST all the way to a driver-ready statement. For DDL nodes,
|
|
37
37
|
* literal column defaults are formatted as inline SQL with SQLite-specific
|
|
38
38
|
* literal syntax (no cast suffix, boolean as 0/1, blob via X'hex'). For
|
|
39
|
-
* query ASTs, params are kept as
|
|
39
|
+
* query ASTs, params are kept as numbered `?N` placeholders; wire values go in
|
|
40
40
|
* `params`. Does NOT call `this.lower()` — independent implementation.
|
|
41
41
|
*/
|
|
42
42
|
lowerToExecuteRequest(ast: AnyQueryAst | SqliteDdlNode, context?: LowererContext<unknown>): Promise<SqlExecuteRequest>;
|
|
@@ -110,4 +110,4 @@ declare class SqliteControlAdapter implements SqlControlAdapter<'sqlite'> {
|
|
|
110
110
|
declare const sqliteAdapterDescriptor: SqlControlAdapterDescriptor<'sqlite'>;
|
|
111
111
|
//#endregion
|
|
112
112
|
export { sqliteAdapterDescriptor as n, SqliteControlAdapter as t };
|
|
113
|
-
//# sourceMappingURL=control-
|
|
113
|
+
//# sourceMappingURL=control-VMpMSXk9.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-
|
|
1
|
+
{"version":3,"file":"control-VMpMSXk9.d.mts","names":[],"sources":["../../../../3-targets/sqlite/2-adapter/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;cAYc,gCAAgC;WACnC;WACA;WACA;mBACQ;mBACA;;EAEjB,YAAY,eAAe,qBAAqB,4BAA4B;EAC5E,yCAAyC;EACzC,uCAAuC;;;;;;;;;EASvC,MAAM,KAAK,cAAc,eAAe,SAAS,0BAA0B;EAC3E,oBAAoB,QAAQ,WAAW,gBAAgB;;;;;;;;EAQvD,sBAAsB,KAAK,cAAc,eAAe,UAAU,0BAA0B,QAAQ;;;;;;EAMpG,WAAW,QAAQ,oCAAoC,gBAAgB,QAAQ;EAC/E,wBAAwB,QAAQ,oCAAoC,gBAAgB,QAAQ;;;;;;EAM5F,eAAe,QAAQ,qCAAqC,QAAQ,oBAAoB;UAChF;;;;;;EAMR,WAAW,QAAQ,oCAAoC,iBAAiB,iBAAiB;UACjF;;;;;;EAMR,aAAa,QAAQ,oCAAoC,eAAe;aAC7D;aACA;aACA;MACP;EACJ,WAAW,QAAQ,oCAAoC,eAAe;aAC3D;aACA;aACA;MACP;;;;;EAKJ,aAAa,QAAQ,oCAAoC,eAAe,sBAAsB;aACnF;aACA;aACA;MACP;EACJ,gBAAgB,GAAG,QAAQ,oCAAoC,UAAU,QAAQ,KAAK,QAAQ;EAC9F,WAAW,SAAS,qCAAqC;;;;EAIzD,iBAAiB,QAAQ,oCAAoC,eAAe;aACjE;aACA;aACA;aACA;aACA;aACA;MACP;UACI;;;;UAIA;EACR,WAAW,QAAQ,oCAAoC,qBAAqB,QAAQ;;;;cAIxE,yBAAyB"}
|
|
@@ -2,10 +2,10 @@ import { c as SQLITE_TEXT_CODEC_ID } from "./codec-ids-wgEvkCkg-WltuexMR.mjs";
|
|
|
2
2
|
import { t as SqliteCreateTable } from "./nodes-DUZSdX86-DWyLY3OW.mjs";
|
|
3
3
|
import { FunctionSource } from "@prisma/orm-family-sql/relational-core/ast";
|
|
4
4
|
import { cfExpr, cfTable, exprSelect } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
5
|
-
//#region ../../../3-targets/sqlite/1-target/dist/ddl-
|
|
5
|
+
//#region ../../../3-targets/sqlite/1-target/dist/ddl-BoTU7bCZ.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Typed builder for the migration planner's column-existence checks. Produces
|
|
8
|
-
* `SELECT COUNT(*) {=|>} 0 AS "result" FROM pragma_table_info(?) WHERE "name" =
|
|
8
|
+
* `SELECT COUNT(*) {=|>} 0 AS "result" FROM pragma_table_info(?1) WHERE "name" = ?2`
|
|
9
9
|
* ASTs with the table and column names bound as text parameters — never
|
|
10
10
|
* inlined into the SQL.
|
|
11
11
|
*/
|
|
@@ -19,8 +19,8 @@ function columnExistsAst(table, column) {
|
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Typed builder for the check that no column of the table has a name SQLite takes for `column`.
|
|
22
|
-
* Produces `SELECT COUNT(*) = 0 AS "result" FROM pragma_table_info(?) WHERE "name" COLLATE NOCASE
|
|
23
|
-
* =
|
|
22
|
+
* Produces `SELECT COUNT(*) = 0 AS "result" FROM pragma_table_info(?1) WHERE "name" COLLATE NOCASE
|
|
23
|
+
* = ?2`: SQLite compares column names without regard to the case of ASCII letters, as `NOCASE`
|
|
24
24
|
* does.
|
|
25
25
|
*/
|
|
26
26
|
function columnNameTakenAst(table, column) {
|
|
@@ -38,7 +38,7 @@ function columnNameTakenAst(table, column) {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Typed builder for table-existence checks over `sqlite_master`.
|
|
41
|
-
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ? AND "name" =
|
|
41
|
+
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ?1 AND "name" = ?2`
|
|
42
42
|
* with the table name and the literal `'table'` bound as text parameters.
|
|
43
43
|
*/
|
|
44
44
|
function tableExistsAst(tableName) {
|
|
@@ -51,7 +51,7 @@ function tableExistsAst(tableName) {
|
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Typed builder for the check that no table, index or view has a name SQLite takes for `name`.
|
|
54
|
-
* Produces `SELECT COUNT(*) = 0 AS "result" FROM "sqlite_master" WHERE "name" COLLATE NOCASE =
|
|
54
|
+
* Produces `SELECT COUNT(*) = 0 AS "result" FROM "sqlite_master" WHERE "name" COLLATE NOCASE = ?1`:
|
|
55
55
|
* tables, indexes and views share one set of names, which SQLite compares without regard to the
|
|
56
56
|
* case of ASCII letters.
|
|
57
57
|
*/
|
|
@@ -69,7 +69,7 @@ function tableNameTakenAst(tableName) {
|
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Typed builder for index-existence checks over `sqlite_master`.
|
|
72
|
-
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ? AND "name" =
|
|
72
|
+
* Produces `SELECT COUNT(*) {=|>} 0 AS "result" FROM "sqlite_master" WHERE "type" = ?1 AND "name" = ?2`
|
|
73
73
|
* with the index name and the literal `'index'` bound as text parameters.
|
|
74
74
|
*/
|
|
75
75
|
function indexExistsAst(indexName) {
|
|
@@ -100,4 +100,4 @@ function createTable(options) {
|
|
|
100
100
|
//#endregion
|
|
101
101
|
export { tableExistsAst as a, indexExistsAst as i, columnNameTakenAst as n, tableNameTakenAst as o, createTable as r, columnExistsAst as t };
|
|
102
102
|
|
|
103
|
-
//# sourceMappingURL=ddl-
|
|
103
|
+
//# sourceMappingURL=ddl-BoTU7bCZ-CXNSFEtj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ddl-BoTU7bCZ-CXNSFEtj.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/ddl-BoTU7bCZ.mjs"],"sourcesContent":["import { c as SQLITE_TEXT_CODEC_ID } from \"./codec-ids-wgEvkCkg.mjs\";\nimport { t as SqliteCreateTable } from \"./nodes-DUZSdX86.mjs\";\nimport { FunctionSource } from \"@internal/sql-relational-core/ast\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* Typed builder for the migration planner's column-existence checks. Produces\n* `SELECT COUNT(*) {=|>} 0 AS \"result\" FROM pragma_table_info(?1) WHERE \"name\" = ?2`\n* ASTs with the table and column names bound as text parameters — never\n* inlined into the SQL.\n*/\nfunction columnExistsAst(table, column) {\n\tconst source = FunctionSource.of(\"pragma_table_info\", [cfExpr.param(table, SQLITE_TEXT_CODEC_ID).ast]);\n\tconst where = cfExpr.identifierRef(\"name\").eqParam(column, SQLITE_TEXT_CODEC_ID);\n\treturn {\n\t\tcolumnAbsent: () => exprSelect().from(source).project(\"result\", cfExpr.countStar().eqLit(0)).where(where).build(),\n\t\tcolumnPresent: () => exprSelect().from(source).project(\"result\", cfExpr.countStar().gtLit(0)).where(where).build()\n\t};\n}\n/**\n* Typed builder for the check that no column of the table has a name SQLite takes for `column`.\n* Produces `SELECT COUNT(*) = 0 AS \"result\" FROM pragma_table_info(?1) WHERE \"name\" COLLATE NOCASE\n* = ?2`: SQLite compares column names without regard to the case of ASCII letters, as `NOCASE`\n* does.\n*/\nfunction columnNameTakenAst(table, column) {\n\tconst source = FunctionSource.of(\"pragma_table_info\", [cfExpr.param(table, SQLITE_TEXT_CODEC_ID).ast]);\n\tconst where = cfExpr.fn({\n\t\tmethod: \"collateNocase\",\n\t\ttemplate: \"{{self}} COLLATE NOCASE\",\n\t\tself: cfExpr.identifierRef(\"name\"),\n\t\treturns: {\n\t\t\tcodecId: SQLITE_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t}).eqParam(column, SQLITE_TEXT_CODEC_ID);\n\treturn { nameFree: () => exprSelect().from(source).project(\"result\", cfExpr.countStar().eqLit(0)).where(where).build() };\n}\n/**\n* Typed builder for table-existence checks over `sqlite_master`.\n* Produces `SELECT COUNT(*) {=|>} 0 AS \"result\" FROM \"sqlite_master\" WHERE \"type\" = ?1 AND \"name\" = ?2`\n* with the table name and the literal `'table'` bound as text parameters.\n*/\nfunction tableExistsAst(tableName) {\n\tconst source = cfTable(\"sqlite_master\");\n\tconst where = cfExpr.allOf([cfExpr.identifierRef(\"type\").eqParam(\"table\", SQLITE_TEXT_CODEC_ID), cfExpr.identifierRef(\"name\").eqParam(tableName, SQLITE_TEXT_CODEC_ID)]);\n\treturn {\n\t\ttableAbsent: () => exprSelect().from(source).project(\"result\", cfExpr.countStar().eqLit(0)).where(where).build(),\n\t\ttablePresent: () => exprSelect().from(source).project(\"result\", cfExpr.countStar().gtLit(0)).where(where).build()\n\t};\n}\n/**\n* Typed builder for the check that no table, index or view has a name SQLite takes for `name`.\n* Produces `SELECT COUNT(*) = 0 AS \"result\" FROM \"sqlite_master\" WHERE \"name\" COLLATE NOCASE = ?1`:\n* tables, indexes and views share one set of names, which SQLite compares without regard to the\n* case of ASCII letters.\n*/\nfunction tableNameTakenAst(tableName) {\n\tconst where = cfExpr.fn({\n\t\tmethod: \"collateNocase\",\n\t\ttemplate: \"{{self}} COLLATE NOCASE\",\n\t\tself: cfExpr.identifierRef(\"name\"),\n\t\treturns: {\n\t\t\tcodecId: SQLITE_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t}).eqParam(tableName, SQLITE_TEXT_CODEC_ID);\n\treturn { nameFree: () => exprSelect().from(cfTable(\"sqlite_master\")).project(\"result\", cfExpr.countStar().eqLit(0)).where(where).build() };\n}\n/**\n* Typed builder for index-existence checks over `sqlite_master`.\n* Produces `SELECT COUNT(*) {=|>} 0 AS \"result\" FROM \"sqlite_master\" WHERE \"type\" = ?1 AND \"name\" = ?2`\n* with the index name and the literal `'index'` bound as text parameters.\n*/\nfunction indexExistsAst(indexName) {\n\tconst source = cfTable(\"sqlite_master\");\n\tconst where = cfExpr.allOf([cfExpr.identifierRef(\"type\").eqParam(\"index\", SQLITE_TEXT_CODEC_ID), cfExpr.identifierRef(\"name\").eqParam(indexName, SQLITE_TEXT_CODEC_ID)]);\n\treturn {\n\t\tindexAbsent: () => exprSelect().from(source).project(\"result\", cfExpr.countStar().eqLit(0)).where(where).build(),\n\t\tindexPresent: () => exprSelect().from(source).project(\"result\", cfExpr.countStar().gtLit(0)).where(where).build()\n\t};\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a SQLite `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, column names/types) are emitted to SQL\n* verbatim — they are not quoted or escaped, so callers must pass pre-trusted\n* values (e.g. fixed control-plane identifiers). String-literal default values,\n* by contrast, are single-quote-escaped (embedded `'` doubled) by the renderer.\n* Identifier quoting for untrusted identifiers is added when the migration\n* planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new SqliteCreateTable(options);\n}\n//#endregion\nexport { tableExistsAst as a, indexExistsAst as i, columnExistsAst as n, tableNameTakenAst as o,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KAAK,MAAM,CAAC,CAAC,QAAQ,UAAU,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;CACjH;AACD;;;;;;;;;;;;;;;AAiBA,SAAS,YAAY,SAAS;CAC7B,OAAO,IAAI,kBAAkB,OAAO;AACrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Op } from "./tables-C9afyQN9-CkIhVNYn.mjs";
|
|
2
|
-
import "./sqlite-migration-
|
|
2
|
+
import "./sqlite-migration-CcXBptQr-DlKSNedI.mjs";
|
|
3
3
|
import { col as col$1, fn as fn$1, foreignKey, lit as lit$1, primaryKey, unique } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
4
4
|
import { placeholder } from "@prisma/orm-framework/errors/migration";
|
|
5
5
|
import { MigrationCLI } from "@prisma/orm-toolchain/cli/migration-cli";
|
|
@@ -41,4 +41,4 @@ declare function dataTransform(opts: DataTransformOptions): Op;
|
|
|
41
41
|
declare function rawSql(op: Op): Op;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { fn$1 as a, placeholder as c, sql as d, unique as f, dataTransform as i, primaryKey as l, MigrationCLI as n, foreignKey as o, col$1 as r, lit$1 as s, DataTransformOptions as t, rawSql as u };
|
|
44
|
-
//# sourceMappingURL=migration-
|
|
44
|
+
//# sourceMappingURL=migration-BHhnGEA2.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-
|
|
1
|
+
{"version":3,"file":"migration-BHhnGEA2.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/migration.d.mts"],"mappings":";;;;;;;;UAOU;;WAEC;;WAEA;;WAEA;;;;;WAKA;;;;;;;;;WASA;;iBAEM,cAAc,MAAM,uBAAuB;;;;;;;;;;iBAU3C,OAAO,IAAI,KAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as buildTargetDetails } from "./planner-target-details-Daaeo8s9-BGAN4JVc.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { T as step } from "./op-factory-call-DADakw8V-yXzHuXlv.mjs";
|
|
3
3
|
import { col as col$1, fn as fn$1, foreignKey, lit as lit$1, primaryKey, unique } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
4
4
|
import { placeholder } from "@prisma/orm-framework/errors/migration";
|
|
5
5
|
import { MigrationCLI } from "@prisma/orm-toolchain/cli/migration-cli";
|
|
@@ -45,4 +45,4 @@ function rawSql(op) {
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { foreignKey as a, primaryKey as c, unique as d, fn$1 as i, rawSql as l, col$1 as n, lit$1 as o, dataTransform as r, placeholder as s, MigrationCLI as t, sql as u };
|
|
47
47
|
|
|
48
|
-
//# sourceMappingURL=migration-
|
|
48
|
+
//# sourceMappingURL=migration-D0UlBTQw.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-
|
|
1
|
+
{"version":3,"file":"migration-D0UlBTQw.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/migration.mjs"],"sourcesContent":["import { t as SqliteMigration } from \"./sqlite-migration-BLyz5GQr.mjs\";\nimport { w as step } from \"./op-factory-call-DADakw8V.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-Daaeo8s9.mjs\";\nimport { placeholder } from \"@internal/errors/migration\";\nimport { col, fn, foreignKey, lit, primaryKey, unique } from \"@internal/sql-relational-core/contract-free\";\nimport { MigrationCLI } from \"@internal/cli/migration-cli\";\nimport { sql } from \"@internal/sql-contract/sql-expression\";\n//#region src/core/migrations/operations/data-transform.ts\n/**\n* User-facing `dataTransform` factory for the SQLite migration authoring\n* surface. Invoked directly inside a `migration.ts` file to supply a\n* user-authored SQL statement that runs with operation class `'data'`.\n*\n* Typical use: the planner emits a `DataTransformCall` stub when a NOT NULL\n* tightening requires a backfill. The rendered `migration.ts` exposes the\n* backfill as a `placeholder(\"…\")` slot the user fills in with an\n* `UPDATE … WHERE col IS NULL` statement. The filled-in `dataTransform(...)`\n* invocation returns a runnable operation the runner executes before the\n* subsequent recreate-table op copies data into the tightened schema.\n*/\nfunction dataTransform(opts) {\n\treturn {\n\t\tid: opts.id,\n\t\tlabel: opts.label,\n\t\tsummary: opts.description,\n\t\toperationClass: \"data\",\n\t\ttarget: {\n\t\t\tid: \"sqlite\",\n\t\t\tdetails: buildTargetDetails(\"table\", opts.table)\n\t\t},\n\t\tprecheck: [],\n\t\texecute: [step(opts.description, opts.run())],\n\t\tpostcheck: []\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/raw.ts\n/**\n* Identity factory for an already-materialized\n* `SqlMigrationPlanOperation<SqlitePlanTargetDetails>`. Mirrors the Postgres\n* `rawSql` factory: the planner uses this to carry ops produced by SQL-family\n* paths (codec lifecycle hooks, raw-SQL escape hatches) alongside structured\n* call IR without reverse-engineering their shape.\n*/\nfunction rawSql(op) {\n\treturn op;\n}\n//#endregion\nexport { SqliteMigration as Migration, MigrationCLI, col, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, sql, unique };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,SAAS,cAAc,MAAM;CAC5B,OAAO;EACN,IAAI,KAAK;EACT,OAAO,KAAK;EACZ,SAAS,KAAK;EACd,gBAAgB;EAChB,QAAQ;GACP,IAAI;GACJ,SAAS,mBAAmB,SAAS,KAAK,KAAK;EAChD;EACA,UAAU,CAAC;EACX,SAAS,CAAC,KAAK,KAAK,aAAa,KAAK,IAAI,CAAC,CAAC;EAC5C,WAAW,CAAC;CACb;AACD;;;;;;;;AAUA,SAAS,OAAO,IAAI;CACnB,OAAO;AACR"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as SqlitePlanTargetDetails } from "./planner-target-details-B-qtfkmj-DIGpv7YQ.mjs";
|
|
2
2
|
import { a as SqliteTableSpec, i as SqliteIndexSpec, n as RecreatePostcheck, r as SqliteColumnSpec } from "./tables-C9afyQN9-CkIhVNYn.mjs";
|
|
3
3
|
import { DdlColumn, DdlTableConstraint } from "@prisma/orm-family-sql/relational-core/ast";
|
|
4
|
-
import { OpFactoryCall } from "@prisma/orm-framework/components/control";
|
|
5
|
-
import { MigrationOperationClass, SqlMigrationPlanOperation, SqlSlot } from "@prisma/orm-family-sql/family/control";
|
|
4
|
+
import { EnumValueCoordinateJson, OpFactoryCall } from "@prisma/orm-framework/components/control";
|
|
5
|
+
import { MigrationOperationClass, SqlMigrationPlanOperation, SqlSlot, StoredValueCodec } from "@prisma/orm-family-sql/family/control";
|
|
6
6
|
import { ImportRequirement, TsExpression } from "@prisma/orm-framework/ts-render";
|
|
7
7
|
import { ExecuteRequestLowerer, Lowerer } from "@prisma/orm-family-sql/family/control-adapter";
|
|
8
8
|
//#region ../../../3-targets/sqlite/1-target/dist/op-factory-call.d.mts
|
|
@@ -175,6 +175,39 @@ declare class DropIndexCall extends SqliteOpFactoryCallNode {
|
|
|
175
175
|
renderTypeScript(): string;
|
|
176
176
|
importRequirements(): readonly ImportRequirement[];
|
|
177
177
|
}
|
|
178
|
+
/** Changes one stored value of a column to another, in every row that holds it. */
|
|
179
|
+
declare class ReplaceStoredValueCall extends SqliteOpFactoryCallNode {
|
|
180
|
+
readonly factoryName: "replaceStoredValue";
|
|
181
|
+
readonly operationClass: "widening";
|
|
182
|
+
readonly tableName: string;
|
|
183
|
+
readonly columnName: string;
|
|
184
|
+
readonly from: string | number;
|
|
185
|
+
readonly to: string | number;
|
|
186
|
+
/** The column's codec, which writes `from` and `to` as the database stores them. */
|
|
187
|
+
readonly codec: StoredValueCodec | undefined;
|
|
188
|
+
readonly label: string;
|
|
189
|
+
constructor(tableName: string, columnName: string, from: string | number, to: string | number, codec?: StoredValueCodec);
|
|
190
|
+
toOp(): Promise<Op>;
|
|
191
|
+
renderTypeScript(): string;
|
|
192
|
+
importRequirements(): readonly ImportRequirement[];
|
|
193
|
+
}
|
|
194
|
+
/** Removes one stored value of a column by setting it to NULL in every row that holds it. */
|
|
195
|
+
declare class RemoveStoredValueCall extends SqliteOpFactoryCallNode {
|
|
196
|
+
readonly factoryName: "removeStoredValue";
|
|
197
|
+
readonly operationClass: "destructive";
|
|
198
|
+
readonly tableName: string;
|
|
199
|
+
readonly columnName: string;
|
|
200
|
+
readonly value: string | number;
|
|
201
|
+
/** The column's codec, which writes `value` as the database stores it. */
|
|
202
|
+
readonly codec: StoredValueCodec | undefined;
|
|
203
|
+
/** The enum value whose stored value is removed, which the check that fails while rows of a required column hold it names. */
|
|
204
|
+
readonly enumValue: EnumValueCoordinateJson | undefined;
|
|
205
|
+
readonly label: string;
|
|
206
|
+
constructor(tableName: string, columnName: string, value: string | number, codec?: StoredValueCodec, enumValue?: EnumValueCoordinateJson);
|
|
207
|
+
toOp(): Promise<Op>;
|
|
208
|
+
renderTypeScript(): string;
|
|
209
|
+
importRequirements(): readonly ImportRequirement[];
|
|
210
|
+
}
|
|
178
211
|
/**
|
|
179
212
|
* A planner-generated data-transform stub. The current default strategy
|
|
180
213
|
* (`nullabilityTighteningBackfillStrategy`) emits one of these with a
|
|
@@ -219,7 +252,7 @@ declare class RawSqlCall extends SqliteOpFactoryCallNode {
|
|
|
219
252
|
toOp(_lowerer?: Lowerer): Op;
|
|
220
253
|
renderTypeScript(): string;
|
|
221
254
|
}
|
|
222
|
-
type SqliteOpFactoryCall = CreateTableCall | DropTableCall | RecreateTableCall | RenameTableCall | RenameColumnCall | AddColumnCall | DropColumnCall | CreateIndexCall | DropIndexCall | DataTransformCall | RawSqlCall;
|
|
255
|
+
type SqliteOpFactoryCall = CreateTableCall | DropTableCall | RecreateTableCall | RenameTableCall | RenameColumnCall | AddColumnCall | DropColumnCall | CreateIndexCall | DropIndexCall | ReplaceStoredValueCall | RemoveStoredValueCall | DataTransformCall | RawSqlCall;
|
|
223
256
|
//#endregion
|
|
224
|
-
export { DropColumnCall as a, RawSqlCall as c,
|
|
225
|
-
//# sourceMappingURL=op-factory-call-
|
|
257
|
+
export { DropColumnCall as a, RawSqlCall as c, RenameColumnCall as d, RenameTableCall as f, DataTransformCall as i, RecreateTableCall as l, SqliteOpFactoryCall as m, CreateIndexCall as n, DropIndexCall as o, ReplaceStoredValueCall as p, CreateTableCall as r, DropTableCall as s, AddColumnCall as t, RemoveStoredValueCall as u };
|
|
258
|
+
//# sourceMappingURL=op-factory-call-B8bJlvkP.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-factory-call-
|
|
1
|
+
{"version":3,"file":"op-factory-call-B8bJlvkP.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/op-factory-call.d.mts"],"mappings":";;;;;;;;;KAQK,KAAK,0BAA0B;uBACb,gCAAgC,wBAAwB;oBAC3D;oBACA,gBAAgB;oBAChB;WACT,KAAK,UAAU,UAAU,KAAK,QAAQ;;EAE/C,MAAM,UAAU,kCAAkC,KAAK,QAAQ;EAC/D,+BAA+B;YACrB;;cAEE,wBAAwB;;WAE3B;WACA;WACA;WACA,kBAAkB;WAClB,sBAAsB;WACtB;EACT,YAAY,mBAAmB,kBAAkB,aAAa,uBAAuB;EACrF,KAAK,UAAU,wBAAwB,QAAQ;EAC/C;EACA,+BAA+B;;cAEnB,sBAAsB;WACzB;WACA;WACA;WACA;EACT,YAAY;EACZ,KAAK,UAAU,wBAAwB,QAAQ;EAC/C;EACA,+BAA+B;;;UAGvB;WACC,MAAM;WACN,QAAQ;;;KAGd,sBAAsB,gBAAgB;cAC7B,wBAAwB;WAC3B;WACA;WACA;;WAEA;WACA;;WAEA,4BAA4B;;;;;WAK5B,qBAAqB;EAC9B,YAAY,sBAAsB,mBAAmB,4BAA4B;;MAE7E;EACJ,MAAM,UAAU,iCAAiC,QAAQ;EACzD,KAAK,UAAU,wBAAwB,QAAQ;EAC/C;EACA,+BAA+B;;cAEnB,yBAAyB;WAC5B;WACA;WACA;WACA;;WAEA;WACA;;WAEA,4BAA4B;;;;;WAK5B,qBAAqB;EAC9B,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ACX;EACT,YAAY,mBAAmB,oBAAoB,wBAAwB,QAAQ,kBAAkB,YAAY;EACjH,QAAQ,QAAQ;EAChB;EACA,+BAA+B;;;;;;;;;;;;;;cAcnB,0BAA0B;WAC7B;WACA;WACA;WACA;WACA;WACA;;WAEA;EACT,YAAY,YAAY,eAAe,mBAAmB,oBAAoB;EAC9E,KAAK,WAAW,UAAU,QAAQ;EAClC;EACA,+BAA+B;;;;;;;;;;;cAWnB,mBAAmB;WACtB;WACA,gBAAgB;WAChB;WACA,IAAI;EACb,YAAY,IAAI;EAChB,KAAK,WAAW,UAAU;EAC1B;;KAEG,sBAAsB,kBAAkB,gBAAgB,oBAAoB,kBAAkB,mBAAmB,gBAAgB,iBAAiB,kBAAkB,gBAAgB,yBAAyB,wBAAwB,oBAAoB"}
|
package/dist/{op-factory-call-82mX3jT--BaXeVrFl.mjs → op-factory-call-DADakw8V-yXzHuXlv.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as sqliteError } from "./errors-DnR-sMHS-D_gh214a.mjs";
|
|
2
|
-
import { a as tableExistsAst, i as indexExistsAst, n as columnNameTakenAst, o as tableNameTakenAst, r as createTable, t as columnExistsAst } from "./ddl-
|
|
2
|
+
import { a as tableExistsAst, i as indexExistsAst, n as columnNameTakenAst, o as tableNameTakenAst, r as createTable, t as columnExistsAst } from "./ddl-BoTU7bCZ-CXNSFEtj.mjs";
|
|
3
3
|
import { n as escapeLiteral, r as quoteIdentifier, t as SQLITE_QUOTING } from "./sql-utils-XGT5Esi2-Zr2mqJf8.mjs";
|
|
4
4
|
import { r as stripOuterParens } from "./default-normalizer-DGMXypHg-CPf7oyZA.mjs";
|
|
5
5
|
import { t as buildTargetDetails } from "./planner-target-details-Daaeo8s9-BGAN4JVc.mjs";
|
|
@@ -11,12 +11,12 @@ import { assertNever } from "@prisma/orm-framework/utils/internal-error";
|
|
|
11
11
|
import "@prisma/orm-family-sql/contract/data-type";
|
|
12
12
|
import { type } from "arktype";
|
|
13
13
|
import { expectAbsent, expectPresent, issueOutcome } from "@prisma/orm-framework/components/control";
|
|
14
|
-
import { checkSqlExpressionText, convertedColumnMeta, createSqlTextSources, isUnfilledSlot, requiredColumnMeta, slotSource, sqlOfSlot } from "@prisma/orm-family-sql/family/control";
|
|
14
|
+
import { checkSqlExpressionText, convertedColumnMeta, createSqlTextSources, encodeStoredValue, isUnfilledSlot, requiredColumnMeta, rowsHoldingValueMeta, slotSource, sqlOfSlot } from "@prisma/orm-family-sql/family/control";
|
|
15
15
|
import { RelationalSchemaNodeKind, sqlColumnTypesEqual } from "@prisma/orm-family-sql/schema-ir/types";
|
|
16
16
|
import { errorMigrationOperationOptionRemoved, unfilledPlaceholderOperation } from "@prisma/orm-framework/errors/migration";
|
|
17
17
|
import { REFERENTIAL_ACTION_SQL } from "@prisma/orm-family-sql/contract/referential-action-sql";
|
|
18
18
|
import { TsExpression, jsonToTsSource, tsArraySource, tsObjectSource, tsQuotedTextSource } from "@prisma/orm-framework/ts-render";
|
|
19
|
-
//#region ../../../3-targets/sqlite/1-target/dist/op-factory-call-
|
|
19
|
+
//#region ../../../3-targets/sqlite/1-target/dist/op-factory-call-DADakw8V.mjs
|
|
20
20
|
function foldAsciiLetters(identifier) {
|
|
21
21
|
return identifier.replace(/[A-Z]/g, (letter) => letter.toLowerCase());
|
|
22
22
|
}
|
|
@@ -122,6 +122,14 @@ function columnShapeCheck(tableName, column) {
|
|
|
122
122
|
sql: `SELECT COUNT(*) > 0 FROM pragma_table_info(${text(tableName)}) WHERE name = ${text(column.name)} AND LOWER(type) = ${text(column.typeSql.toLowerCase())} AND "notnull" = ${column.notNull ? 1 : 0}`
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
+
/** Checks that the column takes NULL, or that no row holds `value` in it. */
|
|
126
|
+
function columnTakesNullOrValueAbsentCheck(tableName, columnName, value, description) {
|
|
127
|
+
return {
|
|
128
|
+
description,
|
|
129
|
+
sql: `SELECT (SELECT COUNT(*) > 0 FROM pragma_table_info(${text(tableName)}) WHERE name = ${text(columnName)} AND "notnull" = 0) OR NOT EXISTS (SELECT 1 FROM ${quoteIdentifier(tableName)} WHERE ${quoteIdentifier(columnName)} = ?1) AS result`,
|
|
130
|
+
params: [value]
|
|
131
|
+
};
|
|
132
|
+
}
|
|
125
133
|
/** Checks that the index is on the table, covers exactly these columns in this order, and is unique or not. */
|
|
126
134
|
function indexDefinitionCheck(tableName, indexName, columns, unique) {
|
|
127
135
|
const positions = columns.map((column, seqno) => `(${seqno}, ${text(column)})`).join(", ");
|
|
@@ -200,6 +208,50 @@ async function renameColumn(tableName, fromName, toName, lowerer) {
|
|
|
200
208
|
postcheck: [step(`verify column "${toName}" exists on "${tableName}"`, toPresent.sql, toPresent.params, expectPresent(`column "${toName}" on "${tableName}"`)), step(`verify column "${fromName}" no longer exists on "${tableName}"`, fromAbsent.sql, fromAbsent.params, expectAbsent(`column "${fromName}" on "${tableName}"`))]
|
|
201
209
|
};
|
|
202
210
|
}
|
|
211
|
+
/** A stored value as operation ids, labels and step descriptions write it. */
|
|
212
|
+
function storedValueText(value) {
|
|
213
|
+
return JSON.stringify(value);
|
|
214
|
+
}
|
|
215
|
+
function idText(value) {
|
|
216
|
+
return String(value);
|
|
217
|
+
}
|
|
218
|
+
function valueAbsentCheck(tableName, columnName, value) {
|
|
219
|
+
return step(`verify no row of "${tableName}" holds value ${storedValueText(value)} in column "${columnName}"`, `SELECT NOT EXISTS (SELECT 1 FROM ${quoteIdentifier(tableName)} WHERE ${quoteIdentifier(columnName)} = ?1) AS result`, [value]);
|
|
220
|
+
}
|
|
221
|
+
function replaceStoredValue(tableName, columnName, from, to) {
|
|
222
|
+
const column = quoteIdentifier(columnName);
|
|
223
|
+
return {
|
|
224
|
+
id: `replaceStoredValue.${tableName}.${columnName}.${idText(from)}`,
|
|
225
|
+
label: `Replace value ${storedValueText(from)} with ${storedValueText(to)} in column "${columnName}" of "${tableName}"`,
|
|
226
|
+
operationClass: "widening",
|
|
227
|
+
target: {
|
|
228
|
+
id: "sqlite",
|
|
229
|
+
details: buildTargetDetails("column", columnName, tableName)
|
|
230
|
+
},
|
|
231
|
+
precheck: [],
|
|
232
|
+
execute: [step(`replace value ${storedValueText(from)} with ${storedValueText(to)} in column "${columnName}"`, `UPDATE ${quoteIdentifier(tableName)} SET ${column} = ?2 WHERE ${column} = ?1`, [from, to])],
|
|
233
|
+
postcheck: [valueAbsentCheck(tableName, columnName, from)]
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function removeStoredValue(tableName, columnName, value, mark) {
|
|
237
|
+
const column = quoteIdentifier(columnName);
|
|
238
|
+
const takesNull = `ensure column "${columnName}" of "${tableName}" takes NULL, or no row holds ${storedValueText(value)} in it`;
|
|
239
|
+
return {
|
|
240
|
+
id: `removeStoredValue.${tableName}.${columnName}.${idText(value)}`,
|
|
241
|
+
label: `Remove value ${storedValueText(value)} from column "${columnName}" of "${tableName}"`,
|
|
242
|
+
operationClass: "destructive",
|
|
243
|
+
target: {
|
|
244
|
+
id: "sqlite",
|
|
245
|
+
details: buildTargetDetails("column", columnName, tableName)
|
|
246
|
+
},
|
|
247
|
+
precheck: [{
|
|
248
|
+
...columnTakesNullOrValueAbsentCheck(tableName, columnName, value, takesNull),
|
|
249
|
+
...mark === void 0 ? {} : { meta: rowsHoldingValueMeta(mark) }
|
|
250
|
+
}],
|
|
251
|
+
execute: [step(`remove value ${storedValueText(value)} from column "${columnName}"`, `UPDATE ${quoteIdentifier(tableName)} SET ${column} = NULL WHERE ${column} = ?1`, [value])],
|
|
252
|
+
postcheck: [valueAbsentCheck(tableName, columnName, value)]
|
|
253
|
+
};
|
|
254
|
+
}
|
|
203
255
|
function buildCreateIndexSql(tableName, indexName, columns, unique = false) {
|
|
204
256
|
return `CREATE ${unique ? "UNIQUE " : ""}INDEX ${quoteIdentifier(indexName)} ON ${quoteIdentifier(tableName)} (${columns.map(quoteIdentifier).join(", ")})`;
|
|
205
257
|
}
|
|
@@ -1283,6 +1335,96 @@ var DropIndexCall = class extends SqliteOpFactoryCallNode {
|
|
|
1283
1335
|
return [];
|
|
1284
1336
|
}
|
|
1285
1337
|
};
|
|
1338
|
+
function replaceStoredValueSource(tableName, columnName, from, to, codec) {
|
|
1339
|
+
return `this.replaceStoredValue({ ${[
|
|
1340
|
+
`table: ${jsonToTsSource(tableName)}`,
|
|
1341
|
+
`column: ${jsonToTsSource(columnName)}`,
|
|
1342
|
+
`from: ${from}`,
|
|
1343
|
+
`to: ${to}`,
|
|
1344
|
+
...codecRefSource(codec)
|
|
1345
|
+
].join(", ")} })`;
|
|
1346
|
+
}
|
|
1347
|
+
function codecRefSource(codec) {
|
|
1348
|
+
return codec === void 0 ? [] : [`codecRef: ${jsonToTsSource(codec.codecRef)}`];
|
|
1349
|
+
}
|
|
1350
|
+
function requireStoredValue(value, factory, tableName, columnName, argument) {
|
|
1351
|
+
if (typeof value === "string" || typeof value === "number" && Number.isFinite(value)) return value;
|
|
1352
|
+
const got = value;
|
|
1353
|
+
throw sqliteError("CONTRACT.ARGUMENT_INVALID", `${factory}({ table: ${jsonToTsSource(tableName)}, column: ${jsonToTsSource(columnName)} }): ${argument} must be a string or a number; got ${typeof got === "number" || got === void 0 ? String(got) : JSON.stringify(got)}`, { meta: { what: `${factory} ${argument}` } });
|
|
1354
|
+
}
|
|
1355
|
+
/** Changes one stored value of a column to another, in every row that holds it. */
|
|
1356
|
+
var ReplaceStoredValueCall = class extends SqliteOpFactoryCallNode {
|
|
1357
|
+
factoryName = "replaceStoredValue";
|
|
1358
|
+
operationClass = "widening";
|
|
1359
|
+
tableName;
|
|
1360
|
+
columnName;
|
|
1361
|
+
from;
|
|
1362
|
+
to;
|
|
1363
|
+
/** The column's codec, which writes `from` and `to` as the database stores them. */
|
|
1364
|
+
codec;
|
|
1365
|
+
label;
|
|
1366
|
+
constructor(tableName, columnName, from, to, codec) {
|
|
1367
|
+
super();
|
|
1368
|
+
this.codec = codec;
|
|
1369
|
+
this.tableName = tableName;
|
|
1370
|
+
this.columnName = columnName;
|
|
1371
|
+
this.from = requireStoredValue(from, this.factoryName, tableName, columnName, "from");
|
|
1372
|
+
this.to = requireStoredValue(to, this.factoryName, tableName, columnName, "to");
|
|
1373
|
+
this.label = `Replace value ${storedValueText(from)} with ${storedValueText(to)} in column "${columnName}" of "${tableName}"`;
|
|
1374
|
+
this.freeze();
|
|
1375
|
+
}
|
|
1376
|
+
async toOp() {
|
|
1377
|
+
return replaceStoredValue(this.tableName, this.columnName, await encodeStoredValue(this.from, this.codec), await encodeStoredValue(this.to, this.codec));
|
|
1378
|
+
}
|
|
1379
|
+
renderTypeScript() {
|
|
1380
|
+
return replaceStoredValueSource(this.tableName, this.columnName, jsonToTsSource(this.from), jsonToTsSource(this.to), this.codec);
|
|
1381
|
+
}
|
|
1382
|
+
importRequirements() {
|
|
1383
|
+
return [];
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
/** Removes one stored value of a column by setting it to NULL in every row that holds it. */
|
|
1387
|
+
var RemoveStoredValueCall = class extends SqliteOpFactoryCallNode {
|
|
1388
|
+
factoryName = "removeStoredValue";
|
|
1389
|
+
operationClass = "destructive";
|
|
1390
|
+
tableName;
|
|
1391
|
+
columnName;
|
|
1392
|
+
value;
|
|
1393
|
+
/** The column's codec, which writes `value` as the database stores it. */
|
|
1394
|
+
codec;
|
|
1395
|
+
/** The enum value whose stored value is removed, which the check that fails while rows of a required column hold it names. */
|
|
1396
|
+
enumValue;
|
|
1397
|
+
label;
|
|
1398
|
+
constructor(tableName, columnName, value, codec, enumValue) {
|
|
1399
|
+
super();
|
|
1400
|
+
this.codec = codec;
|
|
1401
|
+
this.enumValue = enumValue;
|
|
1402
|
+
this.tableName = tableName;
|
|
1403
|
+
this.columnName = columnName;
|
|
1404
|
+
this.value = requireStoredValue(value, this.factoryName, tableName, columnName, "value");
|
|
1405
|
+
this.label = `Remove value ${storedValueText(value)} from column "${columnName}" of "${tableName}"`;
|
|
1406
|
+
this.freeze();
|
|
1407
|
+
}
|
|
1408
|
+
async toOp() {
|
|
1409
|
+
return removeStoredValue(this.tableName, this.columnName, await encodeStoredValue(this.value, this.codec), this.enumValue === void 0 ? void 0 : {
|
|
1410
|
+
enumValue: this.enumValue,
|
|
1411
|
+
value: this.value,
|
|
1412
|
+
...this.codec === void 0 ? {} : { codecRef: this.codec.codecRef }
|
|
1413
|
+
});
|
|
1414
|
+
}
|
|
1415
|
+
renderTypeScript() {
|
|
1416
|
+
return `this.removeStoredValue({ ${[
|
|
1417
|
+
`table: ${jsonToTsSource(this.tableName)}`,
|
|
1418
|
+
`column: ${jsonToTsSource(this.columnName)}`,
|
|
1419
|
+
`value: ${jsonToTsSource(this.value)}`,
|
|
1420
|
+
...codecRefSource(this.codec),
|
|
1421
|
+
...this.enumValue === void 0 ? [] : [`enumValue: ${jsonToTsSource(this.enumValue)}`]
|
|
1422
|
+
].join(", ")} })`;
|
|
1423
|
+
}
|
|
1424
|
+
importRequirements() {
|
|
1425
|
+
return [];
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1286
1428
|
/**
|
|
1287
1429
|
* A planner-generated data-transform stub. The current default strategy
|
|
1288
1430
|
* (`nullabilityTighteningBackfillStrategy`) emits one of these with a
|
|
@@ -1409,6 +1551,6 @@ function renderPostcheck(postcheck) {
|
|
|
1409
1551
|
}));
|
|
1410
1552
|
}
|
|
1411
1553
|
//#endregion
|
|
1412
|
-
export {
|
|
1554
|
+
export { sqliteDefaultToDdlColumnDefault as C, renameTableSteps as S, step as T, buildRecreateSummary as _, DropColumnCall as a, isSqliteOpFactoryCall as b, INLINE_AUTOINCREMENT_PRIMARY_KEY as c, RemoveStoredValueCall as d, RenameColumnCall as f, buildRecreatePostchecks as g, affinityStorageClasses as h, DataTransformCall as i, RawSqlCall as l, ReplaceStoredValueCall as m, CreateIndexCall as n, DropIndexCall as o, RenameTableCall as p, CreateTableCall as r, DropTableCall as s, AddColumnCall as t, RecreateTableCall as u, conversionCopyOf as v, sqliteIdentifiersCollide as w, rebuiltTableName as x, indexReplacementCalls as y };
|
|
1413
1555
|
|
|
1414
|
-
//# sourceMappingURL=op-factory-call-
|
|
1556
|
+
//# sourceMappingURL=op-factory-call-DADakw8V-yXzHuXlv.mjs.map
|