@powersync/web 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.
|
@@ -16972,21 +16972,11 @@ class TriggerManagerImpl {
|
|
|
16972
16972
|
});
|
|
16973
16973
|
}
|
|
16974
16974
|
async createDiffDestinationTable(tableName, options) {
|
|
16975
|
-
const
|
|
16976
|
-
const
|
|
16977
|
-
|
|
16978
|
-
CREATE ${tableTriggerTypeClause} TABLE ${onlyIfNotExists} ${tableName} (
|
|
16979
|
-
operation_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
16980
|
-
id TEXT,
|
|
16981
|
-
operation TEXT,
|
|
16982
|
-
timestamp TEXT,
|
|
16983
|
-
value TEXT,
|
|
16984
|
-
previous_value TEXT
|
|
16985
|
-
)
|
|
16986
|
-
`;
|
|
16987
|
-
console.log(x);
|
|
16975
|
+
const { temporary = true, onlyIfNotExists = false } = options ?? {};
|
|
16976
|
+
const tableTriggerTypeClause = temporary ? 'TEMP' : '';
|
|
16977
|
+
const onlyIfNotExistsClause = onlyIfNotExists ? 'IF NOT EXISTS' : '';
|
|
16988
16978
|
await this.db.execute(/* sql */ `
|
|
16989
|
-
CREATE ${tableTriggerTypeClause} TABLE ${
|
|
16979
|
+
CREATE ${tableTriggerTypeClause} TABLE ${onlyIfNotExistsClause} ${tableName} (
|
|
16990
16980
|
operation_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
16991
16981
|
id TEXT,
|
|
16992
16982
|
operation TEXT,
|
|
@@ -17025,7 +17015,7 @@ class TriggerManagerImpl {
|
|
|
17025
17015
|
const internalSource = sourceDefinition.internalName;
|
|
17026
17016
|
const triggerIds = [];
|
|
17027
17017
|
const id = await this.getUUID();
|
|
17028
|
-
const releaseStorageClaim = useStorage ? await this.options.claimManager.obtainClaim(id) : null;
|
|
17018
|
+
const releaseStorageClaim = useStorage && !manageDestinationExternally ? await this.options.claimManager.obtainClaim(id) : null;
|
|
17029
17019
|
/**
|
|
17030
17020
|
* We default to replicating all columns if no columns array is provided.
|
|
17031
17021
|
*/
|