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.mjs
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
|
*
|
|
@@ -1144,7 +1144,7 @@ function tempTransaction(db, mode, storeNames, fn) {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
|
-
var DEXIE_VERSION = '4.0.
|
|
1147
|
+
var DEXIE_VERSION = '4.0.7';
|
|
1148
1148
|
var maxString = String.fromCharCode(65535);
|
|
1149
1149
|
var minKey = -Infinity;
|
|
1150
1150
|
var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
|
|
@@ -2148,6 +2148,12 @@ var Collection = (function () {
|
|
|
2148
2148
|
}
|
|
2149
2149
|
};
|
|
2150
2150
|
return _this.clone().primaryKeys().then(function (keys) {
|
|
2151
|
+
var criteria = isPlainKeyRange(ctx) &&
|
|
2152
|
+
ctx.limit === Infinity &&
|
|
2153
|
+
(typeof changes !== 'function' || changes === deleteCallback) && {
|
|
2154
|
+
index: ctx.index,
|
|
2155
|
+
range: ctx.range
|
|
2156
|
+
};
|
|
2151
2157
|
var nextChunk = function (offset) {
|
|
2152
2158
|
var count = Math.min(limit, keys.length - offset);
|
|
2153
2159
|
return coreTable.getMany({
|
|
@@ -2180,12 +2186,6 @@ var Collection = (function () {
|
|
|
2180
2186
|
}
|
|
2181
2187
|
}
|
|
2182
2188
|
}
|
|
2183
|
-
var criteria = isPlainKeyRange(ctx) &&
|
|
2184
|
-
ctx.limit === Infinity &&
|
|
2185
|
-
(typeof changes !== 'function' || changes === deleteCallback) && {
|
|
2186
|
-
index: ctx.index,
|
|
2187
|
-
range: ctx.range
|
|
2188
|
-
};
|
|
2189
2189
|
return Promise.resolve(addValues.length > 0 &&
|
|
2190
2190
|
coreTable.mutate({ trans: trans, type: 'add', values: addValues })
|
|
2191
2191
|
.then(function (res) {
|
|
@@ -2201,13 +2201,15 @@ var Collection = (function () {
|
|
|
2201
2201
|
values: putValues,
|
|
2202
2202
|
criteria: criteria,
|
|
2203
2203
|
changeSpec: typeof changes !== 'function'
|
|
2204
|
-
&& changes
|
|
2204
|
+
&& changes,
|
|
2205
|
+
isAdditionalChunk: offset > 0
|
|
2205
2206
|
}).then(function (res) { return applyMutateResult(putValues.length, res); }); }).then(function () { return (deleteKeys.length > 0 || (criteria && changes === deleteCallback)) &&
|
|
2206
2207
|
coreTable.mutate({
|
|
2207
2208
|
trans: trans,
|
|
2208
2209
|
type: 'delete',
|
|
2209
2210
|
keys: deleteKeys,
|
|
2210
|
-
criteria: criteria
|
|
2211
|
+
criteria: criteria,
|
|
2212
|
+
isAdditionalChunk: offset > 0
|
|
2211
2213
|
}).then(function (res) { return applyMutateResult(deleteKeys.length, res); }); }).then(function () {
|
|
2212
2214
|
return keys.length > offset + count && nextChunk(offset + limit);
|
|
2213
2215
|
});
|