@powersync/common 0.0.0-dev-20260306125455 → 0.0.0-dev-20260309101613
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/bundle.cjs +5 -15
- package/dist/bundle.cjs.map +1 -1
- package/dist/bundle.mjs +5 -15
- package/dist/bundle.mjs.map +1 -1
- package/dist/bundle.node.cjs +5 -15
- package/dist/bundle.node.cjs.map +1 -1
- package/dist/bundle.node.mjs +5 -15
- package/dist/bundle.node.mjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/lib/client/triggers/TriggerManager.d.ts +2 -2
- package/lib/client/triggers/TriggerManagerImpl.js +5 -15
- package/lib/client/triggers/TriggerManagerImpl.js.map +1 -1
- package/package.json +1 -1
- package/src/client/triggers/TriggerManager.ts +2 -2
- package/src/client/triggers/TriggerManagerImpl.ts +6 -15
package/dist/bundle.cjs
CHANGED
|
@@ -12490,21 +12490,11 @@ class TriggerManagerImpl {
|
|
|
12490
12490
|
});
|
|
12491
12491
|
}
|
|
12492
12492
|
async createDiffDestinationTable(tableName, options) {
|
|
12493
|
-
const
|
|
12494
|
-
const
|
|
12495
|
-
|
|
12496
|
-
CREATE ${tableTriggerTypeClause} TABLE ${onlyIfNotExists} ${tableName} (
|
|
12497
|
-
operation_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
12498
|
-
id TEXT,
|
|
12499
|
-
operation TEXT,
|
|
12500
|
-
timestamp TEXT,
|
|
12501
|
-
value TEXT,
|
|
12502
|
-
previous_value TEXT
|
|
12503
|
-
)
|
|
12504
|
-
`;
|
|
12505
|
-
console.log(x);
|
|
12493
|
+
const { temporary = true, onlyIfNotExists = false } = options ?? {};
|
|
12494
|
+
const tableTriggerTypeClause = temporary ? 'TEMP' : '';
|
|
12495
|
+
const onlyIfNotExistsClause = onlyIfNotExists ? 'IF NOT EXISTS' : '';
|
|
12506
12496
|
await this.db.execute(/* sql */ `
|
|
12507
|
-
CREATE ${tableTriggerTypeClause} TABLE ${
|
|
12497
|
+
CREATE ${tableTriggerTypeClause} TABLE ${onlyIfNotExistsClause} ${tableName} (
|
|
12508
12498
|
operation_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
12509
12499
|
id TEXT,
|
|
12510
12500
|
operation TEXT,
|
|
@@ -12543,7 +12533,7 @@ class TriggerManagerImpl {
|
|
|
12543
12533
|
const internalSource = sourceDefinition.internalName;
|
|
12544
12534
|
const triggerIds = [];
|
|
12545
12535
|
const id = await this.getUUID();
|
|
12546
|
-
const releaseStorageClaim = useStorage ? await this.options.claimManager.obtainClaim(id) : null;
|
|
12536
|
+
const releaseStorageClaim = useStorage && !manageDestinationExternally ? await this.options.claimManager.obtainClaim(id) : null;
|
|
12547
12537
|
/**
|
|
12548
12538
|
* We default to replicating all columns if no columns array is provided.
|
|
12549
12539
|
*/
|