@voltro/database 0.86.0 → 0.88.0
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/CHANGELOG.md +5484 -0
- package/THIRD-PARTY-NOTICES.md +2 -226
- package/dist/actorSnapshot.js +1 -2
- package/dist/arrayCodec.js +1 -2
- package/dist/branchExecute.js +1 -2
- package/dist/branching.js +1 -2
- package/dist/bulkInsertLimits.js +16 -12
- package/dist/cdcOffsetsTables.js +1 -2
- package/dist/changeEvent.js +1 -2
- package/dist/changeIdentity.js +1 -2
- package/dist/changeListenerCeiling.js +1 -2
- package/dist/columnReference.js +1 -2
- package/dist/columns.js +1 -2
- package/dist/committedChanges.js +1 -2
- package/dist/connectionIdentity.js +1 -2
- package/dist/coreTables.js +1 -2
- package/dist/coreTablesRegistry.js +1 -2
- package/dist/dataTransfers.js +3 -3
- package/dist/dbCause.js +1 -2
- package/dist/dbMetrics.js +1 -2
- package/dist/decimalComparison.js +1 -2
- package/dist/derivedRowId.js +1 -2
- package/dist/dialect.js +1 -2
- package/dist/enumRenames.js +1 -2
- package/dist/expiresMixin.js +1 -2
- package/dist/fieldEncryption.js +65 -43
- package/dist/frameworkTables.js +16 -4
- package/dist/ginIndex.js +1 -2
- package/dist/hybridSearch.js +1 -2
- package/dist/idGenerator.js +5 -6
- package/dist/identifierLimits.js +1 -2
- package/dist/index.d.ts +153 -22
- package/dist/index.js +78 -78
- package/dist/indexAudit.js +45 -44
- package/dist/indexStorage.js +1 -2
- package/dist/joinCompiler.js +1 -2
- package/dist/jsonEagerCompiler.js +1 -2
- package/dist/jsonPatch.js +1 -2
- package/dist/jsonPatchAssignments.js +1 -2
- package/dist/jsonPath.js +1 -2
- package/dist/localFirstMixin.js +1 -2
- package/dist/migrate.js +52 -33
- package/dist/migration.js +1 -2
- package/dist/migrations/appliedAtValue.js +1 -2
- package/dist/migrations/applier.js +400 -386
- package/dist/migrations/boot.js +2 -3
- package/dist/migrations/branchRehearsal.js +1 -2
- package/dist/migrations/columnEquivalence.js +1 -2
- package/dist/migrations/ddlError.js +1 -2
- package/dist/migrations/ddlStatements.js +8 -0
- package/dist/migrations/declaredSchema.js +2 -3
- package/dist/migrations/deployLedger.js +1 -2
- package/dist/migrations/fileBased.js +1 -2
- package/dist/migrations/fileContext.js +1 -2
- package/dist/migrations/fileDiscovery.js +146 -133
- package/dist/migrations/fileSkipProbes.js +1 -2
- package/dist/migrations/fingerprint.js +1 -2
- package/dist/migrations/fkCycles.js +1 -2
- package/dist/migrations/frameworkLiveTables.js +1 -2
- package/dist/migrations/idempotentDdl.js +1 -2
- package/dist/migrations/indexPredicate.js +1 -2
- package/dist/migrations/introspect.js +188 -187
- package/dist/migrations/ledgerRows.js +1 -2
- package/dist/migrations/lock.js +1 -2
- package/dist/migrations/migrationTableExists.js +1 -2
- package/dist/migrations/mssqlColumnDependencies.js +1 -2
- package/dist/migrations/mysqlEngine.js +1 -2
- package/dist/migrations/namespaceCharset.js +1 -2
- package/dist/migrations/planner.js +25 -16
- package/dist/migrations/postgresEnumCheck.js +5 -3
- package/dist/migrations/reactiveTriggerDrift.js +1 -2
- package/dist/migrations/reactiveTriggerName.js +1 -2
- package/dist/migrations/renameMssqlCheck.js +1 -2
- package/dist/migrations/restoreSnapshots.js +1 -2
- package/dist/migrations/resumeLedger.js +1 -2
- package/dist/migrations/rollingDeploy.js +1 -2
- package/dist/migrations/schemaOwner.js +1 -2
- package/dist/migrations/schemaOwnerTable.js +1 -2
- package/dist/migrations/softDropSnapshot.js +1 -2
- package/dist/migrations/sqlLimit.js +1 -2
- package/dist/migrations/sqliteCatalogName.js +12 -0
- package/dist/migrations/sqliteConstraintIdentity.js +1 -2
- package/dist/migrations/sqliteDecimalBoot.js +1 -2
- package/dist/migrations/sqliteDecimalPublication.js +1 -2
- package/dist/migrations/sqliteDecimalReview.js +1 -2
- package/dist/migrations/sqliteDecimalReviewStore.js +1 -2
- package/dist/migrations/sqliteDecimalReviewWitness.js +1 -2
- package/dist/migrations/sqliteDecimalSource.js +1 -2
- package/dist/migrations/sqliteDecimalStage.js +1 -2
- package/dist/migrations/sqliteForeignKeys.js +1 -2
- package/dist/migrations/sqliteMigrationBatch.js +1 -2
- package/dist/migrations/sqliteRetainedSource.js +1 -2
- package/dist/migrations/sqliteRowIdentity.js +1 -2
- package/dist/migrations/sqliteSchemaEpoch.js +1 -2
- package/dist/migrations/sqliteSnapshotGuard.js +1 -2
- package/dist/migrations/sqliteTableContents.js +1 -2
- package/dist/migrations/sqliteTableCopy.js +1 -2
- package/dist/migrations/sqliteTableSchema.js +1 -2
- package/dist/migrations/sqliteWitnessProtection.js +1 -2
- package/dist/migrations/squash.js +1 -2
- package/dist/migrations/storeCharset.js +1 -2
- package/dist/migrations/transactionCause.js +1 -2
- package/dist/migrations/undeclaredCharset.js +1 -2
- package/dist/migrations/uniqueActiveLowering.js +1 -2
- package/dist/mixins.js +1 -2
- package/dist/mssqlDecimalDistinct.js +1 -2
- package/dist/mssqlJsonValueCheck.js +1 -2
- package/dist/mssqlTextStorage.js +1 -2
- package/dist/namespace.js +1 -2
- package/dist/optimisticVersion.js +1 -2
- package/dist/pendingAttribution.js +1 -2
- package/dist/pluginRef.js +1 -2
- package/dist/predicate.js +28 -22
- package/dist/predicateCoercion.js +1 -2
- package/dist/projectedColumn.js +1 -2
- package/dist/queryBuilder.js +7 -2
- package/dist/rawSql.js +1 -2
- package/dist/relations.js +1 -2
- package/dist/relationsRegistry.js +1 -2
- package/dist/replaceInProgress.js +1 -2
- package/dist/requiredColumns.js +1 -2
- package/dist/residency.js +1 -2
- package/dist/retention.js +1 -2
- package/dist/rowDecoder.js +62 -13
- package/dist/rowKey.js +1 -2
- package/dist/rowSchema.js +1 -2
- package/dist/scopeKey.js +1 -2
- package/dist/seed.js +1 -2
- package/dist/snowflake.js +1 -2
- package/dist/sql.d.ts +2746 -3748
- package/dist/sql.js +15 -14
- package/dist/sqlCompiler.js +89 -73
- package/dist/sqlError.js +1 -2
- package/dist/sqlMutation.js +54 -0
- package/dist/sqlPoolCapacity.js +1 -2
- package/dist/sqliteDecimal.js +1 -2
- package/dist/sqliteDecimalAggregateSql.js +1 -2
- package/dist/sqliteDecimalColumnSql.js +1 -2
- package/dist/sqliteDecimalConversion.js +1 -2
- package/dist/sqliteDecimalCte.js +1 -2
- package/dist/sqliteDecimalEncodeSql.js +1 -2
- package/dist/sqliteDecimalOutputs.js +1 -2
- package/dist/sqliteDecimalPredicate.js +1 -2
- package/dist/sqliteDecimalQuery.js +1 -2
- package/dist/sqliteDecimalQueryPlan.js +1 -2
- package/dist/sqliteDecimalResultSql.js +1 -2
- package/dist/sqliteDecimalRowQuery.js +1 -2
- package/dist/sqliteDecimalSetQuery.js +1 -2
- package/dist/sqliteDecimalSource.js +1 -2
- package/dist/sqliteDecimalStorage.js +1 -2
- package/dist/sqliteDecimalSubquery.js +1 -2
- package/dist/sqliteDecimalWindowQuery.js +1 -2
- package/dist/sqliteValueCoercion.js +1 -2
- package/dist/stampId.js +1 -2
- package/dist/storeErrors.js +1 -2
- package/dist/storeRefusal.js +1 -2
- package/dist/stream.js +1 -2
- package/dist/subjectGraph.js +1 -2
- package/dist/table.js +1 -2
- package/dist/tableRegistry.js +1 -2
- package/dist/tenantSelection.js +1 -2
- package/dist/transactionOutcome.js +5 -3
- package/dist/transientContention.js +1 -2
- package/dist/typeId.js +50 -0
- package/dist/typedStore.js +2 -3
- package/dist/upsertUpdate.js +1 -2
- package/dist/vectorEmbedding.js +1 -2
- package/dist/view.js +1 -2
- package/dist/wire.js +1 -2
- package/dist/writeAttribution.js +1 -2
- package/dist/writeRecorder.js +22 -22
- package/package.json +3 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/migrations/fkCycles.ts
|
|
2
2
|
var e = (e, t) => `${e}::${t}`, t = (t, n) => {
|
|
3
3
|
let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = (t) => {
|
|
4
4
|
r.add(t);
|
|
@@ -9,5 +9,4 @@ var e = (e, t) => `${e}::${t}`, t = (t, n) => {
|
|
|
9
9
|
for (let e of [...t].sort()) i.has(e) || o(e);
|
|
10
10
|
return a;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { t as findCyclicFkBackEdges, e as fkEdgeKey };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/migrations/frameworkLiveTables.ts
|
|
2
2
|
var e = /* @__PURE__ */ new Set(["voltro_isr_cache"]), t = (t) => e.has(t) || t.startsWith("_voltro_") || t.startsWith("_cloud_") || t.startsWith("cluster_") || t.startsWith("__turso_internal_"), n = "_voltro_staging_", r = (e) => e.startsWith(n), i = /__dropped_\d{14}$/, a = (e) => i.test(e), o = 7, s = (e) => {
|
|
3
3
|
let t = /__dropped_(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/.exec(e);
|
|
4
4
|
if (t === null) return;
|
|
@@ -21,5 +21,4 @@ var e = /* @__PURE__ */ new Set(["voltro_isr_cache"]), t = (t) => e.has(t) || t.
|
|
|
21
21
|
let n = e.reduce((e, t) => e.ageDays >= t.ageDays ? e : t), r = (/* @__PURE__ */ new Date(Date.now() - t * 864e5)).toISOString().slice(0, 10);
|
|
22
22
|
return `${e.length} soft-drop snapshot(s) older than ${t} day(s) still hold the dropped data (oldest: ${n.name}, ${n.ageDays}d) — ${e.map((e) => e.name).join(", ")}. Restore with \`voltro db restore-snapshot\` or reclaim with \`voltro db gc-snapshots --before ${r}\`; the window is \`database.softDropRetentionDays\` in app.config.`;
|
|
23
23
|
}, u = (e, n) => e.filter((e) => !t(e.name) || n.has(e.name));
|
|
24
|
-
//#endregion
|
|
25
24
|
export { o as DEFAULT_SOFT_DROP_RETENTION_DAYS, e as FRAMEWORK_LIVE_TABLES, n as STAGING_TABLE_PREFIX, c as agedSoftDropSnapshots, l as describeAgedSoftDropSnapshots, t as isFrameworkOwnedLiveTable, a as isSoftDropSnapshotName, r as isStagingTableName, u as plannableLiveTables, s as softDropSnapshotStamp };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/migrations/idempotentDdl.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t = e;
|
|
4
4
|
for (let e = 0; e < 6 && typeof t == "object" && t; e++) {
|
|
@@ -33,5 +33,4 @@ var e = (e) => {
|
|
|
33
33
|
why: "mysql/mariadb ADD CONSTRAINT has no IF NOT EXISTS; 1826 is exactly \"already there\"",
|
|
34
34
|
errno: [1826]
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { i as MYSQL_COLUMN_OR_INDEX_ABSENT, o as MYSQL_CONSTRAINT_ABSENT, s as MYSQL_FOREIGN_KEY_EXISTS, r as MYSQL_INDEX_EXISTS, a as SQLITE_COLUMN_ABSENT, n as isAlreadySatisfied };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/migrations/indexPredicate.ts
|
|
2
2
|
var e = /'(?:''|[^'])*'|"(?:""|[^"])*"|\[(?:\]\]|[^\]])*\]|`(?:``|[^`])*`|[A-Za-z_][A-Za-z_0-9$]*|\d+(?:\.\d+)?|::|<>|!=|<=|>=|\|\||[^\s]/g, t = (t) => {
|
|
3
3
|
let n = 0;
|
|
4
4
|
for (let r of t.matchAll(e)) if (r[0] === "(" && n++, r[0] === ")" && n--, n === 0 && r[0].toLowerCase() === "where") return t.slice(r.index + r[0].length).trim().replace(/;$/, "").trim();
|
|
@@ -46,5 +46,4 @@ var e = /'(?:''|[^'])*'|"(?:""|[^"])*"|\[(?:\]\]|[^\]])*\]|`(?:``|[^`])*`|[A-Za-
|
|
|
46
46
|
};
|
|
47
47
|
return JSON.stringify(o(a));
|
|
48
48
|
};
|
|
49
|
-
//#endregion
|
|
50
49
|
export { t as extractIndexPredicate, n as normalizeIndexPredicate };
|