document-dataply 0.0.8 → 0.0.9-alpha.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/cjs/index.js +17 -2
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -6206,6 +6206,22 @@ var require_cjs = __commonJS({
|
|
|
6206
6206
|
}
|
|
6207
6207
|
return (crc ^ -1) >>> 0;
|
|
6208
6208
|
}
|
|
6209
|
+
function getMinMaxValue(array) {
|
|
6210
|
+
let i = 0;
|
|
6211
|
+
let min = Infinity;
|
|
6212
|
+
let max = -Infinity;
|
|
6213
|
+
let len = array.length;
|
|
6214
|
+
while (i < len) {
|
|
6215
|
+
if (array[i] < min) {
|
|
6216
|
+
min = array[i];
|
|
6217
|
+
}
|
|
6218
|
+
if (array[i] > max) {
|
|
6219
|
+
max = array[i];
|
|
6220
|
+
}
|
|
6221
|
+
i++;
|
|
6222
|
+
}
|
|
6223
|
+
return [min, max];
|
|
6224
|
+
}
|
|
6209
6225
|
var Row = class _Row {
|
|
6210
6226
|
static CONSTANT = {
|
|
6211
6227
|
FLAG_DELETED: 0,
|
|
@@ -9120,8 +9136,7 @@ var require_cjs = __commonJS({
|
|
|
9120
9136
|
for (let i = 0, len = pks.length; i < len; i++) {
|
|
9121
9137
|
pkIndexMap.set(pks[i], i);
|
|
9122
9138
|
}
|
|
9123
|
-
const minPk =
|
|
9124
|
-
const maxPk = Math.max(...pks);
|
|
9139
|
+
const [minPk, maxPk] = getMinMaxValue(pks);
|
|
9125
9140
|
const pkRidPairs = new Array(pks.length).fill(null);
|
|
9126
9141
|
const btx = await this.getBPTreeTransaction(tx);
|
|
9127
9142
|
const stream = btx.whereStream({ gte: minPk, lte: maxPk });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-dataply",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9-alpha.0",
|
|
4
4
|
"description": "Simple and powerful JSON document database supporting complex queries and flexible indexing policies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "izure <admin@izure.org>",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dataply"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"dataply": "^0.0.
|
|
45
|
+
"dataply": "^0.0.24-alpha.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/jest": "^30.0.0",
|