document-dataply 0.0.10-alpha.2 → 0.0.10-alpha.3
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 +4 -3
- package/dist/types/types/index.d.ts +5 -0
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -11094,6 +11094,7 @@ var DocumentDataplyAPI = class extends import_dataply3.DataplyAPI {
|
|
|
11094
11094
|
pageSize: metadata.pageSize,
|
|
11095
11095
|
pageCount: metadata.pageCount,
|
|
11096
11096
|
rowCount: metadata.rowCount,
|
|
11097
|
+
usage: metadata.usage,
|
|
11097
11098
|
indices,
|
|
11098
11099
|
schemeVersion: innerMetadata.schemeVersion ?? 0
|
|
11099
11100
|
};
|
|
@@ -11884,8 +11885,8 @@ var DocumentDataplyAPI = class extends import_dataply3.DataplyAPI {
|
|
|
11884
11885
|
const isFts = ftsConditions.length > 0;
|
|
11885
11886
|
const isCompositeVerify = compositeVerifyConditions.length > 0;
|
|
11886
11887
|
const isVerifyOthers = verifyOthers.length > 0;
|
|
11887
|
-
const
|
|
11888
|
-
let currentChunkSize =
|
|
11888
|
+
const isFiniteLimit = isFinite(limit);
|
|
11889
|
+
let currentChunkSize = isFiniteLimit ? limit : initialChunkSize;
|
|
11889
11890
|
let chunk = [];
|
|
11890
11891
|
let chunkSize = 0;
|
|
11891
11892
|
let dropped = 0;
|
|
@@ -11920,7 +11921,7 @@ var DocumentDataplyAPI = class extends import_dataply3.DataplyAPI {
|
|
|
11920
11921
|
}
|
|
11921
11922
|
docs.push(doc);
|
|
11922
11923
|
}
|
|
11923
|
-
if (
|
|
11924
|
+
if (!isFiniteLimit) {
|
|
11924
11925
|
currentChunkSize = this.adjustChunkSize(currentChunkSize, chunkTotalSize);
|
|
11925
11926
|
}
|
|
11926
11927
|
return docs;
|
|
@@ -53,6 +53,11 @@ export interface DocumentDataplyMetadata {
|
|
|
53
53
|
* The total number of data rows in the dataply.
|
|
54
54
|
*/
|
|
55
55
|
rowCount: number;
|
|
56
|
+
/**
|
|
57
|
+
* The usage of the dataply. It is calculated based on the remaining page capacity.
|
|
58
|
+
* The value is between 0 and 1.
|
|
59
|
+
*/
|
|
60
|
+
usage: number;
|
|
56
61
|
/**
|
|
57
62
|
* The list of user-created index names (excludes internal '_id' index).
|
|
58
63
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-dataply",
|
|
3
|
-
"version": "0.0.10-alpha.
|
|
3
|
+
"version": "0.0.10-alpha.3",
|
|
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>",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"ts-jest": "^29.4.6",
|
|
52
52
|
"typescript": "^5.9.3"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|