@salesforce/lds-runtime-bridge 1.236.0 → 1.238.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/dist/ldsRuntimeBridge.js +19 -7
- package/package.json +1 -1
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -1370,10 +1370,17 @@ class NimbusSqliteStore {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
setMetadata(entries, segment) {
|
|
1372
1372
|
const table = this.getTable(segment);
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1373
|
+
let operation;
|
|
1374
|
+
if (this.plugin.supportsBatchUpdates === undefined ||
|
|
1375
|
+
this.plugin.supportsBatchUpdates() === false) {
|
|
1376
|
+
operation = table.entriesToUpsertOperations(entries, segment);
|
|
1377
|
+
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
1378
|
+
// plugin updates
|
|
1379
|
+
operation.context.type = 'setMetadata';
|
|
1380
|
+
}
|
|
1381
|
+
else {
|
|
1382
|
+
operation = table.metadataToUpdateOperations(entries, segment);
|
|
1383
|
+
}
|
|
1377
1384
|
return this.batchOperationAsPromise([operation]);
|
|
1378
1385
|
}
|
|
1379
1386
|
batchOperations(operations) {
|
|
@@ -1386,7 +1393,11 @@ class NimbusSqliteStore {
|
|
|
1386
1393
|
const table = this.getTable(cur.segment);
|
|
1387
1394
|
if (this.plugin.supportsBatchUpdates === undefined ||
|
|
1388
1395
|
this.plugin.supportsBatchUpdates() === false) {
|
|
1389
|
-
|
|
1396
|
+
const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
|
|
1397
|
+
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
1398
|
+
// plugin updates
|
|
1399
|
+
upsert.context.type = 'setMetadata';
|
|
1400
|
+
acc.push(upsert);
|
|
1390
1401
|
}
|
|
1391
1402
|
else {
|
|
1392
1403
|
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
@@ -1412,7 +1423,8 @@ class NimbusSqliteStore {
|
|
|
1412
1423
|
// if our context contains a type then set that as our main level type
|
|
1413
1424
|
// allows us in the future of updates to specify the segment change happening
|
|
1414
1425
|
// example being update call on metadata only or updating data
|
|
1415
|
-
if (c.type === 'update'
|
|
1426
|
+
if ((c.type === 'update' || c.type === 'upsert') &&
|
|
1427
|
+
c.context.type !== undefined) {
|
|
1416
1428
|
type = c.context.type;
|
|
1417
1429
|
}
|
|
1418
1430
|
return {
|
|
@@ -5993,4 +6005,4 @@ function ldsRuntimeBridge() {
|
|
|
5993
6005
|
}
|
|
5994
6006
|
|
|
5995
6007
|
export { ldsRuntimeBridge as default };
|
|
5996
|
-
// version: 1.
|
|
6008
|
+
// version: 1.238.0-1140a1f61
|