document-dataply 0.0.10-alpha.0 → 0.0.10-alpha.1
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 +16 -9
- package/package.json +3 -3
- package/readme.md +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -9153,10 +9153,15 @@ var require_cjs = __commonJS({
|
|
|
9153
9153
|
}
|
|
9154
9154
|
const metadataPage = await this.pfs.getMetadata(tx);
|
|
9155
9155
|
const manager = this.factory.getManagerFromType(MetadataPageManager.CONSTANT.PAGE_TYPE_METADATA);
|
|
9156
|
+
const pageSize = manager.getPageSize(metadataPage);
|
|
9157
|
+
const pageCount = manager.getPageCount(metadataPage);
|
|
9158
|
+
const rowCount = manager.getRowCount(metadataPage);
|
|
9159
|
+
const usage = pageCount / Math.pow(2, 32);
|
|
9156
9160
|
return {
|
|
9157
|
-
pageSize
|
|
9158
|
-
pageCount
|
|
9159
|
-
rowCount
|
|
9161
|
+
pageSize,
|
|
9162
|
+
pageCount,
|
|
9163
|
+
rowCount,
|
|
9164
|
+
usage
|
|
9160
9165
|
};
|
|
9161
9166
|
}
|
|
9162
9167
|
/**
|
|
@@ -10238,9 +10243,11 @@ var require_cjs = __commonJS({
|
|
|
10238
10243
|
if (!this.initialized) {
|
|
10239
10244
|
throw new Error("Dataply instance is not initialized");
|
|
10240
10245
|
}
|
|
10241
|
-
return this.
|
|
10242
|
-
|
|
10243
|
-
|
|
10246
|
+
return this.runWithDefaultWrite(() => {
|
|
10247
|
+
return this.hook.trigger("close", void 0, async () => {
|
|
10248
|
+
await this.pfs.close();
|
|
10249
|
+
import_node_fs3.default.closeSync(this.fileHandle);
|
|
10250
|
+
});
|
|
10244
10251
|
});
|
|
10245
10252
|
}
|
|
10246
10253
|
};
|
|
@@ -10477,10 +10484,10 @@ var DocumentValueComparator = class extends import_dataply2.ValueComparator {
|
|
|
10477
10484
|
* 두 Primitive 값을 비교합니다.
|
|
10478
10485
|
*/
|
|
10479
10486
|
_compareDiff(a, b) {
|
|
10480
|
-
if (typeof a
|
|
10481
|
-
return
|
|
10487
|
+
if (typeof a === "string" && typeof b === "string") {
|
|
10488
|
+
return this._intlComparator.compare(a, b);
|
|
10482
10489
|
}
|
|
10483
|
-
return
|
|
10490
|
+
return +a - +b;
|
|
10484
10491
|
}
|
|
10485
10492
|
/**
|
|
10486
10493
|
* 두 v 값을 비교합니다. v는 Primitive 또는 Primitive[] (복합 인덱스)일 수 있습니다.
|
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.1",
|
|
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.25-alpha.
|
|
45
|
+
"dataply": "^0.0.25-alpha.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/jest": "^30.0.0",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"ts-jest": "^29.4.6",
|
|
52
52
|
"typescript": "^5.9.3"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
package/readme.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
> **This project is currently in the Alpha stage.**
|
|
9
9
|
> APIs and internal structures may change significantly between versions. Use with caution in production environments.
|
|
10
10
|
|
|
11
|
-
`document-dataply` is a **pure JavaScript** high-performance document-oriented database library built on top of the [`dataply`](https://github.com/izure1/dataply) record storage engine. It is designed to handle
|
|
11
|
+
`document-dataply` is a **pure JavaScript** high-performance document-oriented database library built on top of the [`dataply`](https://github.com/izure1/dataply) record storage engine. It is designed to handle at least millions of documents with high stability, providing a structured way to store, index, and query JSON-style documents.
|
|
12
12
|
|
|
13
13
|
## Key Features
|
|
14
14
|
|
|
@@ -161,7 +161,7 @@ For detailed usage and error handling patterns, see the [Transaction Guide (TRAN
|
|
|
161
161
|
|
|
162
162
|
### Updating and Deleting
|
|
163
163
|
|
|
164
|
-
`document-dataply` provides flexible ways to update or delete documents based on query results. All these operations are **Stream-based**, allowing you to handle millions of records without memory concerns.
|
|
164
|
+
`document-dataply` provides flexible ways to update or delete documents based on query results. All these operations are **Stream-based**, allowing you to handle at least millions of records without memory concerns.
|
|
165
165
|
|
|
166
166
|
- **Partial Update**: Modify only specific fields or use a function for dynamic updates.
|
|
167
167
|
- **Full Update**: Replace the entire document while preserving the original `_id`.
|