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/modern/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
|
*
|
|
@@ -1094,7 +1094,7 @@ function tempTransaction(db, mode, storeNames, fn) {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
|
|
1097
|
-
const DEXIE_VERSION = '4.0.
|
|
1097
|
+
const DEXIE_VERSION = '4.0.7';
|
|
1098
1098
|
const maxString = String.fromCharCode(65535);
|
|
1099
1099
|
const minKey = -Infinity;
|
|
1100
1100
|
const INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
|
|
@@ -2054,6 +2054,12 @@ class Collection {
|
|
|
2054
2054
|
}
|
|
2055
2055
|
};
|
|
2056
2056
|
return this.clone().primaryKeys().then(keys => {
|
|
2057
|
+
const criteria = isPlainKeyRange(ctx) &&
|
|
2058
|
+
ctx.limit === Infinity &&
|
|
2059
|
+
(typeof changes !== 'function' || changes === deleteCallback) && {
|
|
2060
|
+
index: ctx.index,
|
|
2061
|
+
range: ctx.range
|
|
2062
|
+
};
|
|
2057
2063
|
const nextChunk = (offset) => {
|
|
2058
2064
|
const count = Math.min(limit, keys.length - offset);
|
|
2059
2065
|
return coreTable.getMany({
|
|
@@ -2086,12 +2092,6 @@ class Collection {
|
|
|
2086
2092
|
}
|
|
2087
2093
|
}
|
|
2088
2094
|
}
|
|
2089
|
-
const criteria = isPlainKeyRange(ctx) &&
|
|
2090
|
-
ctx.limit === Infinity &&
|
|
2091
|
-
(typeof changes !== 'function' || changes === deleteCallback) && {
|
|
2092
|
-
index: ctx.index,
|
|
2093
|
-
range: ctx.range
|
|
2094
|
-
};
|
|
2095
2095
|
return Promise.resolve(addValues.length > 0 &&
|
|
2096
2096
|
coreTable.mutate({ trans, type: 'add', values: addValues })
|
|
2097
2097
|
.then(res => {
|
|
@@ -2107,13 +2107,15 @@ class Collection {
|
|
|
2107
2107
|
values: putValues,
|
|
2108
2108
|
criteria,
|
|
2109
2109
|
changeSpec: typeof changes !== 'function'
|
|
2110
|
-
&& changes
|
|
2110
|
+
&& changes,
|
|
2111
|
+
isAdditionalChunk: offset > 0
|
|
2111
2112
|
}).then(res => applyMutateResult(putValues.length, res))).then(() => (deleteKeys.length > 0 || (criteria && changes === deleteCallback)) &&
|
|
2112
2113
|
coreTable.mutate({
|
|
2113
2114
|
trans,
|
|
2114
2115
|
type: 'delete',
|
|
2115
2116
|
keys: deleteKeys,
|
|
2116
|
-
criteria
|
|
2117
|
+
criteria,
|
|
2118
|
+
isAdditionalChunk: offset > 0
|
|
2117
2119
|
}).then(res => applyMutateResult(deleteKeys.length, res))).then(() => {
|
|
2118
2120
|
return keys.length > offset + count && nextChunk(offset + limit);
|
|
2119
2121
|
});
|