dexie 4.0.5 → 4.0.7
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/dexie.d.ts +3 -1
- package/dist/dexie.js +12 -10
- package/dist/dexie.js.map +1 -1
- package/dist/dexie.min.js +1 -1
- package/dist/dexie.min.js.map +1 -1
- package/dist/dexie.mjs +12 -10
- package/dist/dexie.mjs.map +1 -1
- package/dist/modern/dexie.min.mjs +1 -1
- package/dist/modern/dexie.min.mjs.map +1 -1
- package/dist/modern/dexie.mjs +12 -10
- package/dist/modern/dexie.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dexie.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* By David Fahlander, david.fahlander@gmail.com
|
|
6
6
|
*
|
|
7
|
-
* Version 4.0.
|
|
7
|
+
* Version 4.0.7, Sun May 26 2024
|
|
8
8
|
*
|
|
9
9
|
* https://dexie.org
|
|
10
10
|
*
|
|
@@ -572,6 +572,7 @@ export interface DBCorePutRequest {
|
|
|
572
572
|
changeSpec?: {
|
|
573
573
|
[keyPath: string]: any;
|
|
574
574
|
}; // Common changeSpec for each key
|
|
575
|
+
isAdditionalChunk?: boolean;
|
|
575
576
|
updates?: {
|
|
576
577
|
keys: any[];
|
|
577
578
|
changeSpecs: {
|
|
@@ -590,6 +591,7 @@ export interface DBCoreDeleteRequest {
|
|
|
590
591
|
index: string | null;
|
|
591
592
|
range: DBCoreKeyRange;
|
|
592
593
|
};
|
|
594
|
+
isAdditionalChunk?: boolean;
|
|
593
595
|
}
|
|
594
596
|
export interface DBCoreDeleteRangeRequest {
|
|
595
597
|
type: "deleteRange";
|
package/dist/dexie.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* By David Fahlander, david.fahlander@gmail.com
|
|
6
6
|
*
|
|
7
|
-
* Version 4.0.
|
|
7
|
+
* Version 4.0.7, Sun May 26 2024
|
|
8
8
|
*
|
|
9
9
|
* https://dexie.org
|
|
10
10
|
*
|
|
@@ -1150,7 +1150,7 @@
|
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
1152
|
|
|
1153
|
-
var DEXIE_VERSION = '4.0.
|
|
1153
|
+
var DEXIE_VERSION = '4.0.7';
|
|
1154
1154
|
var maxString = String.fromCharCode(65535);
|
|
1155
1155
|
var minKey = -Infinity;
|
|
1156
1156
|
var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
|
|
@@ -2154,6 +2154,12 @@
|
|
|
2154
2154
|
}
|
|
2155
2155
|
};
|
|
2156
2156
|
return _this.clone().primaryKeys().then(function (keys) {
|
|
2157
|
+
var criteria = isPlainKeyRange(ctx) &&
|
|
2158
|
+
ctx.limit === Infinity &&
|
|
2159
|
+
(typeof changes !== 'function' || changes === deleteCallback) && {
|
|
2160
|
+
index: ctx.index,
|
|
2161
|
+
range: ctx.range
|
|
2162
|
+
};
|
|
2157
2163
|
var nextChunk = function (offset) {
|
|
2158
2164
|
var count = Math.min(limit, keys.length - offset);
|
|
2159
2165
|
return coreTable.getMany({
|
|
@@ -2186,12 +2192,6 @@
|
|
|
2186
2192
|
}
|
|
2187
2193
|
}
|
|
2188
2194
|
}
|
|
2189
|
-
var criteria = isPlainKeyRange(ctx) &&
|
|
2190
|
-
ctx.limit === Infinity &&
|
|
2191
|
-
(typeof changes !== 'function' || changes === deleteCallback) && {
|
|
2192
|
-
index: ctx.index,
|
|
2193
|
-
range: ctx.range
|
|
2194
|
-
};
|
|
2195
2195
|
return Promise.resolve(addValues.length > 0 &&
|
|
2196
2196
|
coreTable.mutate({ trans: trans, type: 'add', values: addValues })
|
|
2197
2197
|
.then(function (res) {
|
|
@@ -2207,13 +2207,15 @@
|
|
|
2207
2207
|
values: putValues,
|
|
2208
2208
|
criteria: criteria,
|
|
2209
2209
|
changeSpec: typeof changes !== 'function'
|
|
2210
|
-
&& changes
|
|
2210
|
+
&& changes,
|
|
2211
|
+
isAdditionalChunk: offset > 0
|
|
2211
2212
|
}).then(function (res) { return applyMutateResult(putValues.length, res); }); }).then(function () { return (deleteKeys.length > 0 || (criteria && changes === deleteCallback)) &&
|
|
2212
2213
|
coreTable.mutate({
|
|
2213
2214
|
trans: trans,
|
|
2214
2215
|
type: 'delete',
|
|
2215
2216
|
keys: deleteKeys,
|
|
2216
|
-
criteria: criteria
|
|
2217
|
+
criteria: criteria,
|
|
2218
|
+
isAdditionalChunk: offset > 0
|
|
2217
2219
|
}).then(function (res) { return applyMutateResult(deleteKeys.length, res); }); }).then(function () {
|
|
2218
2220
|
return keys.length > offset + count && nextChunk(offset + limit);
|
|
2219
2221
|
});
|