@prisma/orm-target-sqlite 8.0.0-rc.14-dev.29 → 8.0.0-rc.14-dev.30
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-Bp_4Bjff-pcUMeUp5.d.mts → adapter-Bp_4Bjff-Ce3oZAN1.d.mts} +6 -6
- package/dist/{adapter-Bp_4Bjff-pcUMeUp5.d.mts.map → adapter-Bp_4Bjff-Ce3oZAN1.d.mts.map} +1 -1
- package/dist/adapter-C-sqCgrP.d.mts +2 -0
- package/dist/{adapter-Dt53y-dI-CIzvNqp8.mjs → adapter-DUwfMiE4-C-kTEDXO.mjs} +4 -5
- package/dist/adapter-DUwfMiE4-C-kTEDXO.mjs.map +1 -0
- package/dist/adapter.d.mts +10 -10
- package/dist/adapter.mjs +2 -2
- package/dist/adapter__adapter.d.mts +3 -3
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__codec-types.d.mts +3 -3
- package/dist/adapter__control.d.mts +2 -2
- package/dist/adapter__control.mjs +5 -81
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +3 -3
- 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 +3 -3
- package/dist/{codec-descriptor-CWJAw6Ck-BksOSxiO.mjs → codec-descriptor-BX2XRz4V-DxUIN3j3.mjs} +7 -12
- package/dist/codec-descriptor-BX2XRz4V-DxUIN3j3.mjs.map +1 -0
- package/dist/{codec-descriptor-CDLhtrcE-CloMgVh6.d.mts → codec-descriptor-Bux_tjPl-DBQU4lFR.d.mts} +14 -5
- package/dist/codec-descriptor-Bux_tjPl-DBQU4lFR.d.mts.map +1 -0
- package/dist/codec-descriptor-C-BCHOOC-BGr23_XM.d.mts +1 -0
- package/dist/codec-descriptor-OJw51BEj.d.mts +2 -0
- package/dist/codec-types-BXwJkshK.d.mts +2 -0
- package/dist/{codec-types-7LGtuhFP-DzL26PY-.d.mts → codec-types-B_IhsOl9-WPSRXocH.d.mts} +5 -5
- package/dist/{codec-types-7LGtuhFP-DzL26PY-.d.mts.map → codec-types-B_IhsOl9-WPSRXocH.d.mts.map} +1 -1
- package/dist/codec-types-BhSj11Hl.d.mts +1 -0
- package/dist/codecs-DSZbU8RG.d.mts +1 -0
- package/dist/{codecs-BXELYOY1.mjs → codecs-DlI8SadA.mjs} +3 -3
- package/dist/{codecs-BXELYOY1.mjs.map → codecs-DlI8SadA.mjs.map} +1 -1
- package/dist/{codecs-IMTHRn2Y-B8c1e4wg.d.mts → codecs-hLsmWJRa-DfMCx_nO.d.mts} +3 -11
- package/dist/codecs-hLsmWJRa-DfMCx_nO.d.mts.map +1 -0
- package/dist/{codecs-yYxIwGIT-BHW7sSHn.mjs → codecs-r7gY3BuR-B6lXeFyH.mjs} +16 -18
- package/dist/codecs-r7gY3BuR-B6lXeFyH.mjs.map +1 -0
- package/dist/control-CEsPGd0f.mjs +484 -0
- package/dist/control-CEsPGd0f.mjs.map +1 -0
- package/dist/{control-DAys3o_s.d.mts → control-Cg2ATcBk.d.mts} +71 -2
- package/dist/control-Cg2ATcBk.d.mts.map +1 -0
- package/dist/{control-DrJxxfn2.d.mts → control-DgI8tIaw.d.mts} +3 -5
- package/dist/control-DgI8tIaw.d.mts.map +1 -0
- package/dist/{data-types-D9CwP8vB.mjs → data-type-entries-CL0a2goH-BCEztwoX.mjs} +5 -4
- package/dist/data-type-entries-CL0a2goH-BCEztwoX.mjs.map +1 -0
- package/dist/data-types-Bs4y7eZb-B00ws2B6.mjs +111 -0
- package/dist/data-types-Bs4y7eZb-B00ws2B6.mjs.map +1 -0
- package/dist/data-types-ZsgBg_Zg.d.mts +34 -0
- package/dist/data-types-ZsgBg_Zg.d.mts.map +1 -0
- package/dist/{descriptor-meta-D1v5O3db-BN-I6Xfn.mjs → descriptor-meta-AG8POta2-D-k13ZOE.mjs} +9 -16
- package/dist/descriptor-meta-AG8POta2-D-k13ZOE.mjs.map +1 -0
- package/dist/{descriptor-meta-CqCH7n4c-Bx_S6IIu.mjs → descriptor-meta-CFPBLIHW-BwigY92R.mjs} +4 -6
- package/dist/descriptor-meta-CFPBLIHW-BwigY92R.mjs.map +1 -0
- package/dist/{descriptor-meta-runtime-BkXK3OjD-CxZdKHCw.mjs → descriptor-meta-runtime-CIrdwmEr-3T3t3kjc.mjs} +5 -3
- package/dist/descriptor-meta-runtime-CIrdwmEr-3T3t3kjc.mjs.map +1 -0
- package/dist/{migration-EUIIVcIm.mjs → migration-BA5np0wx.mjs} +2 -2
- package/dist/{migration-EUIIVcIm.mjs.map → migration-BA5np0wx.mjs.map} +1 -1
- package/dist/{op-factory-call-CfKnEpob-DTd2gbc-.mjs → op-factory-call-V6Wu86U8-B1Y4idhr.mjs} +18 -13
- package/dist/op-factory-call-V6Wu86U8-B1Y4idhr.mjs.map +1 -0
- package/dist/{pack-DYq6t0MG.d.mts → pack-B1iD7wyf.d.mts} +4 -6
- package/dist/pack-B1iD7wyf.d.mts.map +1 -0
- package/dist/{planner-JsIIYFEw-CDOZsE9T.mjs → planner-Cm5kqc7I-CKSYA8QU.mjs} +5 -5
- package/dist/{planner-JsIIYFEw-CDOZsE9T.mjs.map → planner-Cm5kqc7I-CKSYA8QU.mjs.map} +1 -1
- package/dist/{planner-produced-sqlite-migration-ChcV97kS-CPuxa8bt.mjs → planner-produced-sqlite-migration-DWsg0vgl-N6_jUi2G.mjs} +3 -3
- package/dist/{planner-produced-sqlite-migration-ChcV97kS-CPuxa8bt.mjs.map → planner-produced-sqlite-migration-DWsg0vgl-N6_jUi2G.mjs.map} +1 -1
- package/dist/{runtime-Bjrj3hM2.d.mts → runtime-CG71EORy.d.mts} +2 -2
- package/dist/{runtime-Bjrj3hM2.d.mts.map → runtime-CG71EORy.d.mts.map} +1 -1
- package/dist/sql-renderer-eeiux6H6.d.mts +1 -0
- package/dist/{sqlite-migration-BZqbD0_M-CSqiljPs.mjs → sqlite-migration-CindFauZ-BM2X6Ha3.mjs} +34 -44
- package/dist/sqlite-migration-CindFauZ-BM2X6Ha3.mjs.map +1 -0
- package/dist/target.d.mts +10 -10
- package/dist/target.mjs +12 -11
- package/dist/target__codec-descriptor.d.mts +2 -2
- package/dist/target__codec-descriptor.mjs +1 -1
- package/dist/target__codec-types.d.mts +3 -3
- package/dist/target__codecs.d.mts +2 -2
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__control.d.mts +2 -2
- package/dist/target__control.mjs +3 -433
- package/dist/target__data-types.d.mts +2 -2
- package/dist/target__data-types.mjs +3 -3
- 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__runtime.mjs +1 -1
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/types-CJW_JAJf.d.mts +2 -0
- package/dist/{types-RJMd2PlL-Dqp0xeHo.d.mts → types-RJMd2PlL-CD7b6qkb.d.mts} +3 -3
- package/dist/{types-RJMd2PlL-Dqp0xeHo.d.mts.map → types-RJMd2PlL-CD7b6qkb.d.mts.map} +1 -1
- package/package.json +9 -9
- package/dist/adapter-CTFBoRww.d.mts +0 -2
- package/dist/adapter-Dt53y-dI-CIzvNqp8.mjs.map +0 -1
- package/dist/codec-descriptor-3-wupJWh.d.mts +0 -2
- package/dist/codec-descriptor-C6M9ScCy-BqG7e8Oz.d.mts +0 -1
- package/dist/codec-descriptor-CDLhtrcE-CloMgVh6.d.mts.map +0 -1
- package/dist/codec-descriptor-CWJAw6Ck-BksOSxiO.mjs.map +0 -1
- package/dist/codec-types-1ZdfJ3rh.d.mts +0 -2
- package/dist/codec-types-BQrWed-7.d.mts +0 -1
- package/dist/codecs-CRiL94qi.d.mts +0 -1
- package/dist/codecs-IMTHRn2Y-B8c1e4wg.d.mts.map +0 -1
- package/dist/codecs-yYxIwGIT-BHW7sSHn.mjs.map +0 -1
- package/dist/control-DAys3o_s.d.mts.map +0 -1
- package/dist/control-DrJxxfn2.d.mts.map +0 -1
- package/dist/data-types-B6gYWauJ-DPJUc7_Z.mjs +0 -70
- package/dist/data-types-B6gYWauJ-DPJUc7_Z.mjs.map +0 -1
- package/dist/data-types-BuIx2aG3.d.mts +0 -24
- package/dist/data-types-BuIx2aG3.d.mts.map +0 -1
- package/dist/data-types-D9CwP8vB.mjs.map +0 -1
- package/dist/descriptor-meta-CqCH7n4c-Bx_S6IIu.mjs.map +0 -1
- package/dist/descriptor-meta-D1v5O3db-BN-I6Xfn.mjs.map +0 -1
- package/dist/descriptor-meta-runtime-BkXK3OjD-CxZdKHCw.mjs.map +0 -1
- package/dist/op-factory-call-CfKnEpob-DTd2gbc-.mjs.map +0 -1
- package/dist/pack-DYq6t0MG.d.mts.map +0 -1
- package/dist/sql-renderer-DESroHws.d.mts +0 -1
- package/dist/sqlite-migration-BZqbD0_M-CSqiljPs.mjs.map +0 -1
- package/dist/target__control.mjs.map +0 -1
- package/dist/types-B1tXBpPk.d.mts +0 -2
package/dist/target.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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-
|
|
2
|
-
import "./codec-descriptor-
|
|
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-Bux_tjPl-DBQU4lFR.mjs";
|
|
2
|
+
import "./codec-descriptor-OJw51BEj.mjs";
|
|
3
3
|
import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, d as SQL_INT_CODEC_ID, f as SQL_VARCHAR_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, l as SQL_CHAR_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_FLOAT_CODEC_ID } from "./codec-ids-CzeDyMWW-BZAcI50I.mjs";
|
|
4
|
-
import { C as sqliteJsonColumn, S as sqliteIntegerColumn, T as sqliteTextColumn, _ as sqliteBigintNumberColumn, a as SqliteBlobDescriptor, b as sqliteCodecRegistry, c as SqliteIntegerDescriptor, d as SqliteTextDescriptor, f as assembleSqliteCodecRegistry, g as sqliteBigintColumn, h as jsonDocumentRetag, i as SqliteBigintNumberDescriptor, l as SqliteJsonDescriptor, m as createSqliteCodecRegistryWithBuiltins, n as SQLITE_NOW_EXPRESSION, o as SqliteCodecRegistry, p as createSqliteBuiltinCodecLookup, r as SqliteBigintDescriptor, s as SqliteDatetimeDescriptor, t as JsonValue$1, u as SqliteRealDescriptor, v as sqliteBlobColumn, w as sqliteRealColumn, x as sqliteDatetimeColumn, y as sqliteCodecDescriptorRegistry } from "./codecs-
|
|
5
|
-
import "./codecs-
|
|
4
|
+
import { C as sqliteJsonColumn, S as sqliteIntegerColumn, T as sqliteTextColumn, _ as sqliteBigintNumberColumn, a as SqliteBlobDescriptor, b as sqliteCodecRegistry, c as SqliteIntegerDescriptor, d as SqliteTextDescriptor, f as assembleSqliteCodecRegistry, g as sqliteBigintColumn, h as jsonDocumentRetag, i as SqliteBigintNumberDescriptor, l as SqliteJsonDescriptor, m as createSqliteCodecRegistryWithBuiltins, n as SQLITE_NOW_EXPRESSION, o as SqliteCodecRegistry, p as createSqliteBuiltinCodecLookup, r as SqliteBigintDescriptor, s as SqliteDatetimeDescriptor, t as JsonValue$1, u as SqliteRealDescriptor, v as sqliteBlobColumn, w as sqliteRealColumn, x as sqliteDatetimeColumn, y as sqliteCodecDescriptorRegistry } from "./codecs-hLsmWJRa-DfMCx_nO.mjs";
|
|
5
|
+
import "./codecs-DSZbU8RG.mjs";
|
|
6
6
|
import { i as SqliteDdlVisitor, n as SqliteCreateTable, r as SqliteDdlNode, t as AnySqliteDdlNode } from "./nodes-D8EC1yCx-rpfpuJ4T.mjs";
|
|
7
7
|
import "./ddl-CfSqNT0M.mjs";
|
|
8
|
-
import { t as CodecTypes } from "./codec-types-
|
|
9
|
-
import "./codec-types-
|
|
8
|
+
import { t as CodecTypes } from "./codec-types-B_IhsOl9-WPSRXocH.mjs";
|
|
9
|
+
import "./codec-types-BXwJkshK.mjs";
|
|
10
10
|
import { n as quoteIdentifier, t as escapeLiteral } from "./sql-utils-0SJZOd7Q.mjs";
|
|
11
11
|
import { t as parseSqliteDefault } from "./default-normalizer-B9V7TY5u.mjs";
|
|
12
12
|
import { t as normalizeSqliteNativeType } from "./native-type-normalizer-CO2wKGL6.mjs";
|
|
@@ -14,17 +14,17 @@ import { t as sqliteAggregateDescriptors } from "./aggregates-BGuKJwfI.mjs";
|
|
|
14
14
|
import "./codec-ids-7WqtUuda.mjs";
|
|
15
15
|
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-CCLAXZV2.mjs";
|
|
16
16
|
import { n as buildTargetDetails, t as SqlitePlanTargetDetails } from "./planner-target-details-xR6UfIcz-CMahymzq.mjs";
|
|
17
|
-
import { r as sqliteCreateNamespace, t as SqliteUnboundDatabase } from "./control-
|
|
17
|
+
import { i as sqlitePslTypeConstructors, r as sqliteCreateNamespace, t as SqliteUnboundDatabase } from "./control-Cg2ATcBk.mjs";
|
|
18
18
|
import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-Dua-YcJL.mjs";
|
|
19
|
-
import { a as
|
|
19
|
+
import { a as sqliteCharacterVarying, c as sqliteDatetime, d as sqliteJson, f as sqliteReal, i as sqliteCharacterLengthParams, l as sqliteDatetimeCanonical, n as sqliteBlob, o as sqliteDataTypeEntries, p as sqliteText, r as sqliteCharacter, s as sqliteDataTypes, t as sqliteBigint, u as sqliteInteger } from "./data-types-ZsgBg_Zg.mjs";
|
|
20
20
|
import { t as SqliteContractView } from "./sqlite-contract-view-BpNMaU2m-COMDaGaq.mjs";
|
|
21
21
|
import { t as SqliteMigration } from "./sqlite-migration-2IEGvjRm-BQfd6NLr.mjs";
|
|
22
22
|
import { a as fn, c as placeholder, d 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-LE8F9qcM.mjs";
|
|
23
23
|
import { a as DropColumnCall, c as RawSqlCall, d as SqliteOpFactoryCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameTableCall } from "./op-factory-call-B_WuATMN.mjs";
|
|
24
|
-
import "./pack-
|
|
24
|
+
import "./pack-B1iD7wyf.mjs";
|
|
25
25
|
import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-C6t5lWDq-DXm-Vkhf.mjs";
|
|
26
26
|
import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-B37W4Kaw.mjs";
|
|
27
27
|
import "./planner-produced-sqlite-migration-D7O3_r38.mjs";
|
|
28
28
|
import { t as renderOps } from "./render-ops-B10yqmdG.mjs";
|
|
29
29
|
import { n as SqliteRuntimeTargetInstance, t as SqliteContractSerializer } from "./runtime-B99c4n56.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, RenameTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_NOW_EXPRESSION, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SqliteBigintDescriptor, type SqliteBigintNumberDescriptor, type SqliteBlobDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, type SqliteCodecRegistry, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, type SqliteDatetimeDescriptor, SqliteDdlNode, type SqliteDdlVisitor, type SqliteIntegerDescriptor, type SqliteJsonDescriptor, type SqliteMigrationDestinationInfo, SqliteMigrationPlanner, type SqliteOpFactoryCall, type SqlitePlanResult, type SqlitePlanTargetDetails, type SqliteRealDescriptor, type SqliteRuntimeTargetInstance, type SqliteTextDescriptor, 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, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteAggregateDescriptors, sqliteBigint, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlob, sqliteBlobColumn, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteDatetimeColumn, sqliteInteger, sqliteIntegerColumn, sqliteJson, sqliteJsonColumn, sqliteReal, sqliteRealColumn, sqliteTable, sqliteText, sqliteTextColumn, tableExistsAst, text, unique };
|
|
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, RenameTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_NOW_EXPRESSION, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SqliteBigintDescriptor, type SqliteBigintNumberDescriptor, type SqliteBlobDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, type SqliteCodecRegistry, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, type SqliteDatetimeDescriptor, SqliteDdlNode, type SqliteDdlVisitor, type SqliteIntegerDescriptor, type SqliteJsonDescriptor, type SqliteMigrationDestinationInfo, SqliteMigrationPlanner, type SqliteOpFactoryCall, type SqlitePlanResult, type SqlitePlanTargetDetails, type SqliteRealDescriptor, type SqliteRuntimeTargetInstance, type SqliteTextDescriptor, 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, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteAggregateDescriptors, sqliteBigint, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlob, sqliteBlobColumn, sqliteCharacter, sqliteCharacterLengthParams, sqliteCharacterVarying, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteDatetimeColumn, sqliteInteger, sqliteIntegerColumn, sqliteJson, sqliteJsonColumn, sqlitePslTypeConstructors, sqliteReal, sqliteRealColumn, sqliteTable, sqliteText, sqliteTextColumn, tableExistsAst, text, unique };
|
package/dist/target.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, d as SQL_INT_CODEC_ID, f as SQL_VARCHAR_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, l as SQL_CHAR_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_FLOAT_CODEC_ID } from "./codec-ids-KMliSCRp-BhTbmbGr.mjs";
|
|
2
2
|
import { t as sqliteAggregateDescriptors } from "./aggregates-CATLYJxc.mjs";
|
|
3
|
-
import { a as sqliteCodec, i as isSqliteCodecDescriptor, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as sqliteBigintColumn, c as sqliteDatetimeColumn, d as sqliteRealColumn, f as sqliteTextColumn, i as jsonDocumentRetag, l as sqliteIntegerColumn, o as sqliteBigintNumberColumn, s as sqliteBlobColumn, u as sqliteJsonColumn } from "./codecs-
|
|
3
|
+
import { a as sqliteCodec, i as isSqliteCodecDescriptor, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-BX2XRz4V-DxUIN3j3.mjs";
|
|
4
|
+
import { a as sqliteCharacterVarying, c as sqliteDatetimeCanonical, d as sqliteReal, f as sqliteText, i as sqliteCharacterLengthParams, l as sqliteInteger, n as sqliteBlob, o as sqliteDataTypes, r as sqliteCharacter, s as sqliteDatetime, t as sqliteBigint, u as sqliteJson } from "./data-types-Bs4y7eZb-B00ws2B6.mjs";
|
|
5
|
+
import { a as sqliteBigintColumn, c as sqliteDatetimeColumn, d as sqliteRealColumn, f as sqliteTextColumn, i as jsonDocumentRetag, l as sqliteIntegerColumn, o as sqliteBigintNumberColumn, s as sqliteBlobColumn, u as sqliteJsonColumn } from "./codecs-r7gY3BuR-B6lXeFyH.mjs";
|
|
6
6
|
import { n as SQLITE_NOW_EXPRESSION } from "./datetime-text-Bniwehv--Ddt3VS4z.mjs";
|
|
7
|
-
import { a as sqliteCodecRegistry, i as sqliteCodecDescriptorRegistry, n as createSqliteBuiltinCodecLookup, r as createSqliteCodecRegistryWithBuiltins, t as assembleSqliteCodecRegistry } from "./codecs-
|
|
7
|
+
import { a as sqliteCodecRegistry, i as sqliteCodecDescriptorRegistry, n as createSqliteBuiltinCodecLookup, r as createSqliteCodecRegistryWithBuiltins, t as assembleSqliteCodecRegistry } from "./codecs-DlI8SadA.mjs";
|
|
8
8
|
import { n as SqliteDdlNode, t as SqliteCreateTable } from "./nodes-DUZSdX86-BBEEaxXY.mjs";
|
|
9
9
|
import { i as tableExistsAst, n as createTable, r as indexExistsAst, t as columnExistsAst } from "./ddl-CXduXyOT-nlDP6DGx.mjs";
|
|
10
10
|
import { a as jsonText, i as integer, n as buildSignMarkerBootstrapQueries, o as sqliteTable, r as datetime, s as text, t as buildControlTableBootstrapQueries } from "./contract-free-CH8tBLLe.mjs";
|
|
11
|
+
import { t as sqliteDataTypeEntries } from "./data-type-entries-CL0a2goH-BCEztwoX.mjs";
|
|
11
12
|
import { t as parseSqliteDefault } from "./default-normalizer-Czg-VtmN-DEbkGbn7.mjs";
|
|
12
13
|
import { n as quoteIdentifier, t as escapeLiteral } from "./sql-utils-C2O4zVkP-Dz3Hb85I.mjs";
|
|
13
14
|
import { t as buildTargetDetails } from "./planner-target-details-CIQ789Gc-C5U4yVY9.mjs";
|
|
14
|
-
import { a as DropColumnCall, c as RawSqlCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameTableCall } from "./op-factory-call-
|
|
15
|
+
import { a as DropColumnCall, c as RawSqlCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameTableCall } from "./op-factory-call-V6Wu86U8-B1Y4idhr.mjs";
|
|
15
16
|
import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-D_o8dKRB-BXi43noL.mjs";
|
|
16
17
|
import { i as sqliteCreateNamespace, n as SqliteContractView, r as SqliteUnboundDatabase, t as SqliteContractSerializer } from "./sqlite-contract-view-BYR10usg-BteDAUZr.mjs";
|
|
17
|
-
import { t as SqliteMigration } from "./sqlite-migration-
|
|
18
|
+
import { t as SqliteMigration } from "./sqlite-migration-CindFauZ-BM2X6Ha3.mjs";
|
|
18
19
|
import { t as renderOps } from "./render-ops-KxAmAz6d-W2xyvA5y.mjs";
|
|
19
|
-
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-
|
|
20
|
-
import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-
|
|
21
|
-
import {
|
|
22
|
-
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as unique } from "./migration-
|
|
20
|
+
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-DWsg0vgl-N6_jUi2G.mjs";
|
|
21
|
+
import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-Cm5kqc7I-CKSYA8QU.mjs";
|
|
22
|
+
import { n as sqlitePslTypeConstructors } from "./control-CEsPGd0f.mjs";
|
|
23
|
+
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as unique } from "./migration-BA5np0wx.mjs";
|
|
23
24
|
import { t as normalizeSqliteNativeType } from "./native-type-normalizer-GpQMEyN5.mjs";
|
|
24
|
-
export { AddColumnCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, RenameTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_NOW_EXPRESSION, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqliteCodecDescriptor, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, SqliteDdlNode, SqliteMigrationPlanner, SqliteUnboundDatabase, TypeScriptRenderableSqliteMigration, assembleSqliteCodecRegistry, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteAggregateDescriptors, sqliteBigint, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlob, sqliteBlobColumn, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteDatetimeColumn, sqliteInteger, sqliteIntegerColumn, sqliteJson, sqliteJsonColumn, sqliteReal, sqliteRealColumn, sqliteTable, sqliteText, sqliteTextColumn, tableExistsAst, text, unique };
|
|
25
|
+
export { AddColumnCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, RenameTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_NOW_EXPRESSION, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqliteCodecDescriptor, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, SqliteDdlNode, SqliteMigrationPlanner, SqliteUnboundDatabase, TypeScriptRenderableSqliteMigration, assembleSqliteCodecRegistry, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteAggregateDescriptors, sqliteBigint, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlob, sqliteBlobColumn, sqliteCharacter, sqliteCharacterLengthParams, sqliteCharacterVarying, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteDatetimeColumn, sqliteInteger, sqliteIntegerColumn, sqliteJson, sqliteJsonColumn, sqlitePslTypeConstructors, sqliteReal, sqliteRealColumn, sqliteTable, sqliteText, sqliteTextColumn, tableExistsAst, text, unique };
|
|
@@ -1,3 +1,3 @@
|
|
|
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-
|
|
2
|
-
import "./codec-descriptor-
|
|
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-Bux_tjPl-DBQU4lFR.mjs";
|
|
2
|
+
import "./codec-descriptor-OJw51BEj.mjs";
|
|
3
3
|
export { type AdaptedSqliteCodecDescriptor, type AnySqliteCodecDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, buildSqliteCodecDescriptorRegistry, defineSqliteCodecs, isSqliteCodecDescriptor, sqliteCodec };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as sqliteCodec, i as isSqliteCodecDescriptor, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-
|
|
1
|
+
import { a as sqliteCodec, i as isSqliteCodecDescriptor, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-BX2XRz4V-DxUIN3j3.mjs";
|
|
2
2
|
export { SqliteCodecDescriptor, buildSqliteCodecDescriptorRegistry, defineSqliteCodecs, isSqliteCodecDescriptor, sqliteCodec };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as JsonValue$1 } from "./codecs-
|
|
2
|
-
import { t as CodecTypes } from "./codec-types-
|
|
3
|
-
import "./codec-types-
|
|
1
|
+
import { t as JsonValue$1 } from "./codecs-hLsmWJRa-DfMCx_nO.mjs";
|
|
2
|
+
import { t as CodecTypes } from "./codec-types-B_IhsOl9-WPSRXocH.mjs";
|
|
3
|
+
import "./codec-types-BXwJkshK.mjs";
|
|
4
4
|
export { CodecTypes, type JsonValue$1 as JsonValue };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as sqliteJsonColumn, S as sqliteIntegerColumn, T as sqliteTextColumn, _ as sqliteBigintNumberColumn, a as SqliteBlobDescriptor, b as sqliteCodecRegistry, c as SqliteIntegerDescriptor, d as SqliteTextDescriptor, f as assembleSqliteCodecRegistry, g as sqliteBigintColumn, h as jsonDocumentRetag, i as SqliteBigintNumberDescriptor, l as SqliteJsonDescriptor, m as createSqliteCodecRegistryWithBuiltins, n as SQLITE_NOW_EXPRESSION, o as SqliteCodecRegistry, p as createSqliteBuiltinCodecLookup, r as SqliteBigintDescriptor, s as SqliteDatetimeDescriptor, t as JsonValue$1, u as SqliteRealDescriptor, v as sqliteBlobColumn, w as sqliteRealColumn, x as sqliteDatetimeColumn, y as sqliteCodecDescriptorRegistry } from "./codecs-
|
|
2
|
-
import "./codecs-
|
|
1
|
+
import { C as sqliteJsonColumn, S as sqliteIntegerColumn, T as sqliteTextColumn, _ as sqliteBigintNumberColumn, a as SqliteBlobDescriptor, b as sqliteCodecRegistry, c as SqliteIntegerDescriptor, d as SqliteTextDescriptor, f as assembleSqliteCodecRegistry, g as sqliteBigintColumn, h as jsonDocumentRetag, i as SqliteBigintNumberDescriptor, l as SqliteJsonDescriptor, m as createSqliteCodecRegistryWithBuiltins, n as SQLITE_NOW_EXPRESSION, o as SqliteCodecRegistry, p as createSqliteBuiltinCodecLookup, r as SqliteBigintDescriptor, s as SqliteDatetimeDescriptor, t as JsonValue$1, u as SqliteRealDescriptor, v as sqliteBlobColumn, w as sqliteRealColumn, x as sqliteDatetimeColumn, y as sqliteCodecDescriptorRegistry } from "./codecs-hLsmWJRa-DfMCx_nO.mjs";
|
|
2
|
+
import "./codecs-DSZbU8RG.mjs";
|
|
3
3
|
export { type JsonValue$1 as JsonValue, SQLITE_NOW_EXPRESSION, type SqliteBigintDescriptor, type SqliteBigintNumberDescriptor, type SqliteBlobDescriptor, type SqliteCodecRegistry, type SqliteDatetimeDescriptor, type SqliteIntegerDescriptor, type SqliteJsonDescriptor, type SqliteRealDescriptor, type SqliteTextDescriptor, assembleSqliteCodecRegistry, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, jsonDocumentRetag, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlobColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };
|
package/dist/target__codecs.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as sqliteBigintColumn, c as sqliteDatetimeColumn, d as sqliteRealColumn, f as sqliteTextColumn, i as jsonDocumentRetag, l as sqliteIntegerColumn, o as sqliteBigintNumberColumn, s as sqliteBlobColumn, u as sqliteJsonColumn } from "./codecs-
|
|
1
|
+
import { a as sqliteBigintColumn, c as sqliteDatetimeColumn, d as sqliteRealColumn, f as sqliteTextColumn, i as jsonDocumentRetag, l as sqliteIntegerColumn, o as sqliteBigintNumberColumn, s as sqliteBlobColumn, u as sqliteJsonColumn } from "./codecs-r7gY3BuR-B6lXeFyH.mjs";
|
|
2
2
|
import { n as SQLITE_NOW_EXPRESSION } from "./datetime-text-Bniwehv--Ddt3VS4z.mjs";
|
|
3
|
-
import { a as sqliteCodecRegistry, i as sqliteCodecDescriptorRegistry, n as createSqliteBuiltinCodecLookup, r as createSqliteCodecRegistryWithBuiltins, t as assembleSqliteCodecRegistry } from "./codecs-
|
|
3
|
+
import { a as sqliteCodecRegistry, i as sqliteCodecDescriptorRegistry, n as createSqliteBuiltinCodecLookup, r as createSqliteCodecRegistryWithBuiltins, t as assembleSqliteCodecRegistry } from "./codecs-DlI8SadA.mjs";
|
|
4
4
|
export { SQLITE_NOW_EXPRESSION, assembleSqliteCodecRegistry, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, jsonDocumentRetag, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlobColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as SqlitePlanTargetDetails } from "./planner-target-details-xR6UfIcz-CMahymzq.mjs";
|
|
2
|
-
import { n as sqliteControlTargetDescriptor, r as sqliteCreateNamespace, t as SqliteUnboundDatabase } from "./control-
|
|
3
|
-
export { type SqlitePlanTargetDetails, SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace };
|
|
2
|
+
import { i as sqlitePslTypeConstructors, n as sqliteControlTargetDescriptor, r as sqliteCreateNamespace, t as SqliteUnboundDatabase } from "./control-Cg2ATcBk.mjs";
|
|
3
|
+
export { type SqlitePlanTargetDetails, SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqlitePslTypeConstructors };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,433 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
|
|
4
|
-
import { i as sqliteCreateNamespace, r as SqliteUnboundDatabase, t as SqliteContractSerializer } from "./sqlite-contract-view-BYR10usg-BteDAUZr.mjs";
|
|
5
|
-
import { a as diffSqliteSchema, f as verifySqliteDatabaseSchema, u as sqliteContractToSchema } from "./sqlite-migration-BZqbD0_M-CSqiljPs.mjs";
|
|
6
|
-
import { n as createSqliteMigrationPlanner } from "./planner-JsIIYFEw-CDOZsE9T.mjs";
|
|
7
|
-
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
8
|
-
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
9
|
-
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
10
|
-
import { relationalNodeEntityKind, relationalNodeGranularity } from "@prisma/orm-family-sql/schema-ir/types";
|
|
11
|
-
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
12
|
-
import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
|
|
13
|
-
import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
|
|
14
|
-
import { buildDataTypeResolver, runnerFailure, runnerSuccess } from "@prisma/orm-family-sql/family/control";
|
|
15
|
-
import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
|
|
16
|
-
//#region ../../../3-targets/3-targets/sqlite/dist/control.mjs
|
|
17
|
-
function createSqliteMigrationRunner(family) {
|
|
18
|
-
return new SqliteMigrationRunner(family);
|
|
19
|
-
}
|
|
20
|
-
var SqliteMigrationRunner = class {
|
|
21
|
-
family;
|
|
22
|
-
constructor(family) {
|
|
23
|
-
this.family = family;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Apply the plan against an already-open connection without managing
|
|
27
|
-
* the transaction lifecycle. The caller ({@link SqliteMigrationRunner.execute})
|
|
28
|
-
* owns BEGIN/COMMIT/ROLLBACK and any connection-level setup (FK pragma
|
|
29
|
-
* toggle, FK integrity check).
|
|
30
|
-
*/
|
|
31
|
-
async executeOnConnection(options) {
|
|
32
|
-
const driver = options.driver;
|
|
33
|
-
if (options.space !== void 0 && options.space !== options.plan.spaceId) throw sqliteError("MIGRATION.CONTRACT_SPACE_VIOLATION", `SqlMigrationRunner: options.space (${options.space}) does not match plan.spaceId (${options.plan.spaceId})`, { meta: {
|
|
34
|
-
space: options.space,
|
|
35
|
-
planSpaceId: options.plan.spaceId
|
|
36
|
-
} });
|
|
37
|
-
const space = options.plan.spaceId;
|
|
38
|
-
const planOps = blindCast(await Promise.all(options.plan.operations));
|
|
39
|
-
const destinationCheck = this.ensurePlanMatchesDestinationContract(options.plan.destination, options.destinationContract);
|
|
40
|
-
if (!destinationCheck.ok) return destinationCheck;
|
|
41
|
-
const policyCheck = this.enforcePolicyCompatibility(options.policy, planOps);
|
|
42
|
-
if (!policyCheck.ok) return policyCheck;
|
|
43
|
-
const ensureResult = await this.ensureControlTables(driver, options.destinationContract);
|
|
44
|
-
if (!ensureResult.ok) return ensureResult;
|
|
45
|
-
const existingMarker = await this.family.readMarker({
|
|
46
|
-
driver,
|
|
47
|
-
space
|
|
48
|
-
});
|
|
49
|
-
const markerCheck = this.ensureMarkerCompatibility(existingMarker, options.plan);
|
|
50
|
-
if (!markerCheck.ok) return markerCheck;
|
|
51
|
-
const markerAtDestination = this.markerMatchesDestination(existingMarker, options.plan);
|
|
52
|
-
const isSelfEdge = options.plan.origin?.storageHash === options.plan.destination.storageHash;
|
|
53
|
-
const skipOperations = markerAtDestination && options.plan.origin != null && !isSelfEdge;
|
|
54
|
-
let operationsExecuted;
|
|
55
|
-
let executedOperations;
|
|
56
|
-
if (skipOperations) {
|
|
57
|
-
operationsExecuted = 0;
|
|
58
|
-
executedOperations = [];
|
|
59
|
-
} else {
|
|
60
|
-
const applyResult = await this.applyPlan(driver, options, planOps);
|
|
61
|
-
if (!applyResult.ok) return applyResult;
|
|
62
|
-
operationsExecuted = applyResult.value.operationsExecuted;
|
|
63
|
-
executedOperations = applyResult.value.executedOperations;
|
|
64
|
-
}
|
|
65
|
-
if (space === APP_SPACE_ID) {
|
|
66
|
-
const schemaNode = await this.family.introspect({
|
|
67
|
-
driver,
|
|
68
|
-
contract: options.destinationContract
|
|
69
|
-
});
|
|
70
|
-
const schemaVerifyResult = verifySqliteDatabaseSchema({
|
|
71
|
-
contract: options.destinationContract,
|
|
72
|
-
actualSchema: schemaNode,
|
|
73
|
-
strict: options.strictVerification ?? true,
|
|
74
|
-
typeMetadataRegistry: this.family.typeMetadataRegistry,
|
|
75
|
-
frameworkComponents: options.frameworkComponents
|
|
76
|
-
});
|
|
77
|
-
if (!schemaVerifyResult.ok) return runnerFailure("MIGRATION.SCHEMA_VERIFY_FAILED", schemaVerifyResult.summary, {
|
|
78
|
-
why: "The resulting database schema does not satisfy the destination contract.",
|
|
79
|
-
meta: { issues: schemaVerifyResult.schema.issues }
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
const incomingInvariants = options.plan.providedInvariants;
|
|
83
|
-
const existingInvariants = new Set(existingMarker?.invariants ?? []);
|
|
84
|
-
const incomingIsSubsetOfExisting = incomingInvariants.every((id) => existingInvariants.has(id));
|
|
85
|
-
if (!(isSelfEdge && operationsExecuted === 0 && incomingIsSubsetOfExisting)) {
|
|
86
|
-
const markerResult = await this.upsertMarker(driver, options, existingMarker, space);
|
|
87
|
-
if (!markerResult.ok) return markerResult;
|
|
88
|
-
await this.recordLedgerEntries(driver, options, executedOperations);
|
|
89
|
-
}
|
|
90
|
-
return runnerSuccess({
|
|
91
|
-
operationsPlanned: planOps.length,
|
|
92
|
-
operationsExecuted
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
async execute(options) {
|
|
96
|
-
const driver = options.driver;
|
|
97
|
-
const perSpaceOptions = options.perSpaceOptions;
|
|
98
|
-
if (perSpaceOptions.length === 0) return ok({ perSpaceResults: [] });
|
|
99
|
-
const fkWasEnabled = await this.readForeignKeysEnabled(driver);
|
|
100
|
-
if (fkWasEnabled) await driver.query("PRAGMA foreign_keys = OFF");
|
|
101
|
-
try {
|
|
102
|
-
await this.beginExclusiveTransaction(driver);
|
|
103
|
-
let committed = false;
|
|
104
|
-
try {
|
|
105
|
-
const perSpaceResults = [];
|
|
106
|
-
let lastProcessedSpace;
|
|
107
|
-
for (const spaceOptions of perSpaceOptions) {
|
|
108
|
-
const space = spaceOptions.space ?? spaceOptions.plan.spaceId;
|
|
109
|
-
const result = await this.executeOnConnection({
|
|
110
|
-
...spaceOptions,
|
|
111
|
-
driver,
|
|
112
|
-
space
|
|
113
|
-
});
|
|
114
|
-
if (!result.ok) return notOk({
|
|
115
|
-
...result.failure,
|
|
116
|
-
failingSpace: space
|
|
117
|
-
});
|
|
118
|
-
perSpaceResults.push({
|
|
119
|
-
space,
|
|
120
|
-
value: result.value
|
|
121
|
-
});
|
|
122
|
-
lastProcessedSpace = space;
|
|
123
|
-
}
|
|
124
|
-
if (fkWasEnabled) {
|
|
125
|
-
const fkIntegrityCheck = await this.verifyForeignKeyIntegrity(driver);
|
|
126
|
-
if (!fkIntegrityCheck.ok) return notOk({
|
|
127
|
-
...fkIntegrityCheck.failure,
|
|
128
|
-
failingSpace: lastProcessedSpace ?? APP_SPACE_ID
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
await this.commitTransaction(driver);
|
|
132
|
-
committed = true;
|
|
133
|
-
return ok({ perSpaceResults });
|
|
134
|
-
} finally {
|
|
135
|
-
if (!committed) await this.rollbackTransaction(driver);
|
|
136
|
-
}
|
|
137
|
-
} finally {
|
|
138
|
-
if (fkWasEnabled) await driver.query("PRAGMA foreign_keys = ON");
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
async readForeignKeysEnabled(driver) {
|
|
142
|
-
return (await driver.query("PRAGMA foreign_keys")).rows[0]?.foreign_keys === 1;
|
|
143
|
-
}
|
|
144
|
-
async verifyForeignKeyIntegrity(driver) {
|
|
145
|
-
const result = await driver.query("PRAGMA foreign_key_check");
|
|
146
|
-
if (result.rows.length === 0) return okVoid();
|
|
147
|
-
return runnerFailure("MIGRATION.FOREIGN_KEY_VIOLATION", `Foreign key integrity check failed after migration: ${result.rows.length} violation(s).`, {
|
|
148
|
-
why: "PRAGMA foreign_key_check reported violations after applying recreate-table operations.",
|
|
149
|
-
meta: { violations: result.rows }
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
async applyPlan(driver, options, ops) {
|
|
153
|
-
const checks = options.executionChecks;
|
|
154
|
-
const runPrechecks = checks?.prechecks !== false;
|
|
155
|
-
const runPostchecks = checks?.postchecks !== false;
|
|
156
|
-
const runIdempotency = checks?.idempotencyChecks !== false;
|
|
157
|
-
let operationsExecuted = 0;
|
|
158
|
-
const executedOperations = [];
|
|
159
|
-
for (const operation of ops) {
|
|
160
|
-
options.callbacks?.onOperationStart?.(operation);
|
|
161
|
-
try {
|
|
162
|
-
if (runPostchecks && runIdempotency) {
|
|
163
|
-
if (await this.expectationsAreSatisfied(driver, operation.postcheck)) {
|
|
164
|
-
executedOperations.push(this.createSkipRecord(operation));
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
if (runPrechecks) {
|
|
169
|
-
const precheckResult = await this.runExpectationSteps(driver, operation.precheck, operation, "precheck");
|
|
170
|
-
if (!precheckResult.ok) return precheckResult;
|
|
171
|
-
}
|
|
172
|
-
const executeResult = await this.runExecuteSteps(driver, operation.execute, operation);
|
|
173
|
-
if (!executeResult.ok) return executeResult;
|
|
174
|
-
if (runPostchecks) {
|
|
175
|
-
const postcheckResult = await this.runExpectationSteps(driver, operation.postcheck, operation, "postcheck");
|
|
176
|
-
if (!postcheckResult.ok) return postcheckResult;
|
|
177
|
-
}
|
|
178
|
-
executedOperations.push(operation);
|
|
179
|
-
operationsExecuted += 1;
|
|
180
|
-
} finally {
|
|
181
|
-
options.callbacks?.onOperationComplete?.(operation);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return ok({
|
|
185
|
-
operationsExecuted,
|
|
186
|
-
executedOperations
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
async ensureControlTables(driver, contract) {
|
|
190
|
-
const legacyDetection = await this.detectLegacyMarkerShape(driver);
|
|
191
|
-
if (!legacyDetection.ok) return legacyDetection;
|
|
192
|
-
const lowererContext = { contract };
|
|
193
|
-
for (const query of this.family.bootstrapControlTableQueries()) await this.executeStatement(driver, await this.family.lowerAst(query, lowererContext));
|
|
194
|
-
return okVoid();
|
|
195
|
-
}
|
|
196
|
-
async detectLegacyMarkerShape(driver) {
|
|
197
|
-
const tableInfo = await driver.query(`PRAGMA table_info("${MARKER_TABLE_NAME}")`);
|
|
198
|
-
if (tableInfo.rows.length === 0) return okVoid();
|
|
199
|
-
const columns = new Set(tableInfo.rows.map((row) => row.name));
|
|
200
|
-
if (columns.has("space")) return okVoid();
|
|
201
|
-
return runnerFailure("MIGRATION.LEGACY_MARKER_SHAPE", `Legacy marker-table shape detected on ${MARKER_TABLE_NAME} (no \`space\` column). Prisma 8 is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop \`${MARKER_TABLE_NAME}\` and re-run \`dbInit\` to reinitialise from a clean baseline.`, { meta: {
|
|
202
|
-
table: MARKER_TABLE_NAME,
|
|
203
|
-
columns: [...columns].sort()
|
|
204
|
-
} });
|
|
205
|
-
}
|
|
206
|
-
async runExpectationSteps(driver, steps, operation, phase) {
|
|
207
|
-
for (const step of steps) {
|
|
208
|
-
const result = await driver.query(step.sql, step.params ?? []);
|
|
209
|
-
if (!this.stepResultIsTrue(result.rows)) return runnerFailure(phase === "precheck" ? "MIGRATION.PRECHECK_FAILED" : "MIGRATION.POSTCHECK_FAILED", `Operation ${operation.id} failed during ${phase}: ${step.description}`, { meta: {
|
|
210
|
-
operationId: operation.id,
|
|
211
|
-
phase,
|
|
212
|
-
stepDescription: step.description
|
|
213
|
-
} });
|
|
214
|
-
}
|
|
215
|
-
return okVoid();
|
|
216
|
-
}
|
|
217
|
-
async runExecuteSteps(driver, steps, operation) {
|
|
218
|
-
for (const step of steps) try {
|
|
219
|
-
await driver.query(step.sql, step.params ?? []);
|
|
220
|
-
} catch (error) {
|
|
221
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
222
|
-
return runnerFailure("MIGRATION.EXECUTION_FAILED", `Operation ${operation.id} failed during execution: ${step.description}`, {
|
|
223
|
-
why: message,
|
|
224
|
-
meta: {
|
|
225
|
-
operationId: operation.id,
|
|
226
|
-
stepDescription: step.description,
|
|
227
|
-
sql: step.sql
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
return okVoid();
|
|
232
|
-
}
|
|
233
|
-
stepResultIsTrue(rows) {
|
|
234
|
-
if (!rows || rows.length === 0) return false;
|
|
235
|
-
const firstRow = rows[0];
|
|
236
|
-
const firstValue = firstRow ? Object.values(firstRow)[0] : void 0;
|
|
237
|
-
if (typeof firstValue === "number") return firstValue !== 0;
|
|
238
|
-
if (typeof firstValue === "boolean") return firstValue;
|
|
239
|
-
if (typeof firstValue === "string") {
|
|
240
|
-
const lower = firstValue.toLowerCase();
|
|
241
|
-
if (lower === "true" || lower === "1") return true;
|
|
242
|
-
if (lower === "false" || lower === "0") return false;
|
|
243
|
-
return firstValue.length > 0;
|
|
244
|
-
}
|
|
245
|
-
return Boolean(firstValue);
|
|
246
|
-
}
|
|
247
|
-
async expectationsAreSatisfied(driver, steps) {
|
|
248
|
-
if (steps.length === 0) return false;
|
|
249
|
-
for (const step of steps) {
|
|
250
|
-
const result = await driver.query(step.sql, step.params ?? []);
|
|
251
|
-
if (!this.stepResultIsTrue(result.rows)) return false;
|
|
252
|
-
}
|
|
253
|
-
return true;
|
|
254
|
-
}
|
|
255
|
-
createSkipRecord(operation) {
|
|
256
|
-
return Object.freeze({
|
|
257
|
-
id: operation.id,
|
|
258
|
-
label: operation.label,
|
|
259
|
-
...ifDefined("summary", operation.summary),
|
|
260
|
-
operationClass: operation.operationClass,
|
|
261
|
-
target: operation.target,
|
|
262
|
-
precheck: Object.freeze([]),
|
|
263
|
-
execute: Object.freeze([]),
|
|
264
|
-
postcheck: Object.freeze([...operation.postcheck]),
|
|
265
|
-
meta: Object.freeze({
|
|
266
|
-
...operation.meta ?? {},
|
|
267
|
-
runner: Object.freeze({
|
|
268
|
-
skipped: true,
|
|
269
|
-
reason: "postcheck_pre_satisfied"
|
|
270
|
-
})
|
|
271
|
-
})
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
markerMatchesDestination(marker, plan) {
|
|
275
|
-
if (!marker) return false;
|
|
276
|
-
if (marker.storageHash !== plan.destination.storageHash) return false;
|
|
277
|
-
if (plan.destination.profileHash && marker.profileHash !== plan.destination.profileHash) return false;
|
|
278
|
-
return true;
|
|
279
|
-
}
|
|
280
|
-
enforcePolicyCompatibility(policy, operations) {
|
|
281
|
-
const allowedClasses = new Set(policy.allowedOperationClasses);
|
|
282
|
-
for (const operation of operations) if (!allowedClasses.has(operation.operationClass)) return runnerFailure("MIGRATION.POLICY_VIOLATION", `Operation ${operation.id} has class "${operation.operationClass}" which is not allowed by policy.`, {
|
|
283
|
-
why: `Policy only allows: ${policy.allowedOperationClasses.join(", ")}.`,
|
|
284
|
-
meta: {
|
|
285
|
-
operationId: operation.id,
|
|
286
|
-
operationClass: operation.operationClass,
|
|
287
|
-
allowedClasses: policy.allowedOperationClasses
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
return okVoid();
|
|
291
|
-
}
|
|
292
|
-
ensureMarkerCompatibility(marker, plan) {
|
|
293
|
-
const origin = plan.origin ?? null;
|
|
294
|
-
if (!origin) return okVoid();
|
|
295
|
-
if (!marker) return runnerFailure("MIGRATION.MARKER_ORIGIN_MISMATCH", `Missing contract marker: expected origin storage hash ${origin.storageHash}.`, { meta: { expectedOriginStorageHash: origin.storageHash } });
|
|
296
|
-
if (marker.storageHash !== origin.storageHash) return runnerFailure("MIGRATION.MARKER_ORIGIN_MISMATCH", `Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`, { meta: {
|
|
297
|
-
markerStorageHash: marker.storageHash,
|
|
298
|
-
expectedOriginStorageHash: origin.storageHash
|
|
299
|
-
} });
|
|
300
|
-
if (origin.profileHash && marker.profileHash !== origin.profileHash) return runnerFailure("MIGRATION.MARKER_ORIGIN_MISMATCH", `Existing contract marker profile hash (${marker.profileHash}) does not match plan origin profile hash (${origin.profileHash}).`, { meta: {
|
|
301
|
-
markerProfileHash: marker.profileHash,
|
|
302
|
-
expectedOriginProfileHash: origin.profileHash
|
|
303
|
-
} });
|
|
304
|
-
return okVoid();
|
|
305
|
-
}
|
|
306
|
-
ensurePlanMatchesDestinationContract(destination, contract) {
|
|
307
|
-
if (destination.storageHash !== contract.storage.storageHash) return runnerFailure("MIGRATION.DESTINATION_CONTRACT_MISMATCH", `Plan destination storage hash (${destination.storageHash}) does not match provided contract storage hash (${contract.storage.storageHash}).`, { meta: {
|
|
308
|
-
planStorageHash: destination.storageHash,
|
|
309
|
-
contractStorageHash: contract.storage.storageHash
|
|
310
|
-
} });
|
|
311
|
-
if (destination.profileHash && contract.profileHash && destination.profileHash !== contract.profileHash) return runnerFailure("MIGRATION.DESTINATION_CONTRACT_MISMATCH", `Plan destination profile hash (${destination.profileHash}) does not match provided contract profile hash (${contract.profileHash}).`, { meta: {
|
|
312
|
-
planProfileHash: destination.profileHash,
|
|
313
|
-
contractProfileHash: contract.profileHash
|
|
314
|
-
} });
|
|
315
|
-
return okVoid();
|
|
316
|
-
}
|
|
317
|
-
async upsertMarker(driver, options, existingMarker, space) {
|
|
318
|
-
const destination = {
|
|
319
|
-
storageHash: options.plan.destination.storageHash,
|
|
320
|
-
profileHash: options.plan.destination.profileHash ?? options.destinationContract.profileHash ?? options.plan.destination.storageHash,
|
|
321
|
-
invariants: options.plan.providedInvariants ?? []
|
|
322
|
-
};
|
|
323
|
-
if (!existingMarker) {
|
|
324
|
-
await this.family.initMarker({
|
|
325
|
-
driver,
|
|
326
|
-
space,
|
|
327
|
-
destination
|
|
328
|
-
});
|
|
329
|
-
return okVoid();
|
|
330
|
-
}
|
|
331
|
-
if (!await this.family.updateMarker({
|
|
332
|
-
driver,
|
|
333
|
-
space,
|
|
334
|
-
expectedFrom: existingMarker.storageHash,
|
|
335
|
-
destination
|
|
336
|
-
})) return runnerFailure("MIGRATION.MARKER_CAS_FAILURE", "Marker was modified by another process during migration execution.", { meta: {
|
|
337
|
-
space,
|
|
338
|
-
expectedStorageHash: existingMarker.storageHash,
|
|
339
|
-
destinationStorageHash: options.plan.destination.storageHash
|
|
340
|
-
} });
|
|
341
|
-
return okVoid();
|
|
342
|
-
}
|
|
343
|
-
async recordLedgerEntries(driver, options, executedOperations) {
|
|
344
|
-
const plan = options.plan;
|
|
345
|
-
const space = plan.spaceId;
|
|
346
|
-
const edges = options.migrationEdges;
|
|
347
|
-
const totalEdgeOps = edges.reduce((sum, edge) => sum + edge.operationCount, 0);
|
|
348
|
-
if (totalEdgeOps !== plan.operations.length) throw new InternalError(`Ledger write: plan.operations length (${plan.operations.length}) does not match sum of migrationEdges operationCount (${totalEdgeOps})`);
|
|
349
|
-
let offset = 0;
|
|
350
|
-
for (const edge of edges) {
|
|
351
|
-
const edgeOps = executedOperations.slice(offset, offset + edge.operationCount);
|
|
352
|
-
offset += edge.operationCount;
|
|
353
|
-
await this.family.writeLedgerEntry({
|
|
354
|
-
driver,
|
|
355
|
-
space,
|
|
356
|
-
entry: {
|
|
357
|
-
edgeId: `${edge.from}->${edge.to}`,
|
|
358
|
-
from: edge.from,
|
|
359
|
-
to: edge.to,
|
|
360
|
-
migrationName: edge.dirName,
|
|
361
|
-
migrationHash: edge.migrationHash,
|
|
362
|
-
operations: edgeOps
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
async beginExclusiveTransaction(driver) {
|
|
368
|
-
await driver.query("BEGIN EXCLUSIVE");
|
|
369
|
-
}
|
|
370
|
-
async commitTransaction(driver) {
|
|
371
|
-
await driver.query("COMMIT");
|
|
372
|
-
}
|
|
373
|
-
async rollbackTransaction(driver) {
|
|
374
|
-
await driver.query("ROLLBACK");
|
|
375
|
-
}
|
|
376
|
-
async executeStatement(driver, statement) {
|
|
377
|
-
await driver.query(statement.sql, statement.params);
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
/**
|
|
381
|
-
* SQLite target `SchemaVerifier` concretion. Mirrors the Postgres
|
|
382
|
-
* shape: hooks return the empty list pending the call-site migration
|
|
383
|
-
* that routes the existing verifier behaviour through the SPI.
|
|
384
|
-
*/
|
|
385
|
-
var SqliteSchemaVerifier = class extends SqlSchemaVerifierBase {
|
|
386
|
-
verifyCommonSqlSchema(_options) {
|
|
387
|
-
return [];
|
|
388
|
-
}
|
|
389
|
-
verifyTargetExtensions(_options) {
|
|
390
|
-
return [];
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
function isSqlContract(contract) {
|
|
394
|
-
return contract === null || contract.storage instanceof SqlStorage;
|
|
395
|
-
}
|
|
396
|
-
const sqliteControlTargetDescriptor = {
|
|
397
|
-
...sqliteTargetDescriptorMeta,
|
|
398
|
-
contractSerializer: new SqliteContractSerializer(),
|
|
399
|
-
schemaVerifier: new SqliteSchemaVerifier(),
|
|
400
|
-
diffSchema(input) {
|
|
401
|
-
return diffSqliteSchema(input);
|
|
402
|
-
},
|
|
403
|
-
classifySubjectGranularity: relationalNodeGranularity,
|
|
404
|
-
classifyEntityKind: relationalNodeEntityKind,
|
|
405
|
-
migrations: {
|
|
406
|
-
createPlanner(adapter) {
|
|
407
|
-
return createSqliteMigrationPlanner(adapter);
|
|
408
|
-
},
|
|
409
|
-
createRunner(family) {
|
|
410
|
-
return createSqliteMigrationRunner(family);
|
|
411
|
-
},
|
|
412
|
-
contractToSchema(contract, frameworkComponents) {
|
|
413
|
-
if (!isSqlContract(contract)) throw sqliteError("CONTRACT.TARGET_MISMATCH", "sqliteControlTargetDescriptor.contractToSchema received a non-SQL contract; expected Contract<SqlStorage>");
|
|
414
|
-
return sqliteContractToSchema(contract, { ...ifDefined("dataTypeOf", buildDataTypeResolver(frameworkComponents)) });
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
create() {
|
|
418
|
-
return {
|
|
419
|
-
familyId: "sql",
|
|
420
|
-
targetId: "sqlite"
|
|
421
|
-
};
|
|
422
|
-
},
|
|
423
|
-
createPlanner(adapter) {
|
|
424
|
-
return createSqliteMigrationPlanner(adapter);
|
|
425
|
-
},
|
|
426
|
-
createRunner(family) {
|
|
427
|
-
return createSqliteMigrationRunner(family);
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
//#endregion
|
|
431
|
-
export { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace };
|
|
432
|
-
|
|
433
|
-
//# sourceMappingURL=target__control.mjs.map
|
|
1
|
+
import { i as sqliteCreateNamespace, r as SqliteUnboundDatabase } from "./sqlite-contract-view-BYR10usg-BteDAUZr.mjs";
|
|
2
|
+
import { n as sqlitePslTypeConstructors, t as sqliteControlTargetDescriptor } from "./control-CEsPGd0f.mjs";
|
|
3
|
+
export { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqlitePslTypeConstructors };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { sqliteBigint, sqliteBlob, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteInteger, sqliteJson, sqliteReal, sqliteText };
|
|
1
|
+
import { a as sqliteCharacterVarying, c as sqliteDatetime, d as sqliteJson, f as sqliteReal, i as sqliteCharacterLengthParams, l as sqliteDatetimeCanonical, n as sqliteBlob, o as sqliteDataTypeEntries, p as sqliteText, r as sqliteCharacter, s as sqliteDataTypes, t as sqliteBigint, u as sqliteInteger } from "./data-types-ZsgBg_Zg.mjs";
|
|
2
|
+
export { sqliteBigint, sqliteBlob, sqliteCharacter, sqliteCharacterLengthParams, sqliteCharacterVarying, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteInteger, sqliteJson, sqliteReal, sqliteText };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { t as sqliteDataTypeEntries } from "./data-
|
|
3
|
-
export { sqliteBigint, sqliteBlob, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteInteger, sqliteJson, sqliteReal, sqliteText };
|
|
1
|
+
import { a as sqliteCharacterVarying, c as sqliteDatetimeCanonical, d as sqliteReal, f as sqliteText, i as sqliteCharacterLengthParams, l as sqliteInteger, n as sqliteBlob, o as sqliteDataTypes, r as sqliteCharacter, s as sqliteDatetime, t as sqliteBigint, u as sqliteJson } from "./data-types-Bs4y7eZb-B00ws2B6.mjs";
|
|
2
|
+
import { t as sqliteDataTypeEntries } from "./data-type-entries-CL0a2goH-BCEztwoX.mjs";
|
|
3
|
+
export { sqliteBigint, sqliteBlob, sqliteCharacter, sqliteCharacterLengthParams, sqliteCharacterVarying, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetime, sqliteDatetimeCanonical, sqliteInteger, sqliteJson, sqliteReal, sqliteText };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as SqliteMigration } from "./sqlite-migration-
|
|
2
|
-
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as unique } from "./migration-
|
|
1
|
+
import { t as SqliteMigration } from "./sqlite-migration-CindFauZ-BM2X6Ha3.mjs";
|
|
2
|
+
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as unique } from "./migration-BA5np0wx.mjs";
|
|
3
3
|
export { SqliteMigration as Migration, MigrationCLI, col, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, unique };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DropColumnCall, c as RawSqlCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameTableCall } from "./op-factory-call-
|
|
1
|
+
import { a as DropColumnCall, c as RawSqlCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameTableCall } from "./op-factory-call-V6Wu86U8-B1Y4idhr.mjs";
|
|
2
2
|
export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, RenameTableCall };
|
package/dist/target__pack.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as sqliteTargetDescriptorMeta } from "./pack-
|
|
1
|
+
import { t as sqliteTargetDescriptorMeta } from "./pack-B1iD7wyf.mjs";
|
|
2
2
|
export { sqliteTargetDescriptorMeta as default };
|
package/dist/target__pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-
|
|
1
|
+
import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-AG8POta2-D-k13ZOE.mjs";
|
|
2
2
|
export { sqliteTargetDescriptorMeta as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-
|
|
1
|
+
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-DWsg0vgl-N6_jUi2G.mjs";
|
|
2
2
|
export { TypeScriptRenderableSqliteMigration };
|