@salesforce/lds-store-nimbus 1.266.0-dev24 → 1.266.0-dev26
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/index.js +12 -1
- package/dist/types/NimbusSqliteStore.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -256,6 +256,9 @@ class NimbusSqliteStore {
|
|
|
256
256
|
isEvalSupported() {
|
|
257
257
|
return true;
|
|
258
258
|
}
|
|
259
|
+
isBatchUpdateSupported() {
|
|
260
|
+
return this.supportsBatchUpdates;
|
|
261
|
+
}
|
|
259
262
|
query(sql, params) {
|
|
260
263
|
return new Promise((resolve, reject) => {
|
|
261
264
|
this.plugin.query(sql, params, (result) => {
|
|
@@ -298,6 +301,7 @@ class NimbusSqliteStore {
|
|
|
298
301
|
return this.batchOperationAsPromise([operation]);
|
|
299
302
|
}
|
|
300
303
|
batchOperations(operations) {
|
|
304
|
+
let fallbackSetMetadata = [];
|
|
301
305
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
302
306
|
if (cur.type === 'setEntries') {
|
|
303
307
|
const table = this.getTable(cur.segment);
|
|
@@ -321,7 +325,14 @@ class NimbusSqliteStore {
|
|
|
321
325
|
}
|
|
322
326
|
return acc;
|
|
323
327
|
}, []);
|
|
324
|
-
return this.batchOperationAsPromise(sqliteOperations)
|
|
328
|
+
return this.batchOperationAsPromise(sqliteOperations).then(() => {
|
|
329
|
+
if (fallbackSetMetadata.length > 0) {
|
|
330
|
+
return Promise.all(fallbackSetMetadata.map((fallback) => {
|
|
331
|
+
const { entries, segment } = fallback;
|
|
332
|
+
return this.setMetadata(entries, segment);
|
|
333
|
+
})).then(() => { });
|
|
334
|
+
}
|
|
335
|
+
});
|
|
325
336
|
}
|
|
326
337
|
evictEntries(entryIds, segment) {
|
|
327
338
|
const sqliteOperation = this.idsToDeleteOperation(entryIds, segment);
|
|
@@ -14,6 +14,7 @@ export declare class NimbusSqliteStore implements SqliteStore, DurableStore {
|
|
|
14
14
|
private supportsBatchUpdates;
|
|
15
15
|
constructor(plugin: SqliteStorePlugin, additionalTableMap?: Record<string, LdsDataTableBase>);
|
|
16
16
|
isEvalSupported(): boolean;
|
|
17
|
+
isBatchUpdateSupported(): boolean;
|
|
17
18
|
query(sql: string, params: SqliteType[]): Promise<SqliteResult>;
|
|
18
19
|
batchQuery(queries: SQLQuery[]): Promise<SqliteResult[]>;
|
|
19
20
|
getEntries<T>(entryIds: string[], segment: string): Promise<DurableStoreEntries<T> | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-store-nimbus",
|
|
3
|
-
"version": "1.266.0-
|
|
3
|
+
"version": "1.266.0-dev26",
|
|
4
4
|
"description": "A nimbus-plugin-based implementation of the Luvio DurableStore and SqliteStore.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"test:size": "luvioBundlesize"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@luvio/environments": "0.154.7-
|
|
29
|
-
"@salesforce/lds-store-sql": "^1.266.0-
|
|
30
|
-
"@salesforce/nimbus-plugin-lds": "^1.266.0-
|
|
28
|
+
"@luvio/environments": "0.154.7-dev9",
|
|
29
|
+
"@salesforce/lds-store-sql": "^1.266.0-dev26",
|
|
30
|
+
"@salesforce/nimbus-plugin-lds": "^1.266.0-dev26"
|
|
31
31
|
},
|
|
32
32
|
"luvioBundlesize": [
|
|
33
33
|
{
|