@lossless.org/nosqldb 10.1.1 → 10.2.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.
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "format": "tsrust.build-provenance.v2",
3
- "binarySha256": "ef5967c55ec1c790a14f98bf9d1eabf788023cf34aac123b671a7dfbdd13f485",
3
+ "binarySha256": "e3b27e759285b7ec2349ee0d9c19b9b224f223a5615dd55e9e98d3aea944bdc1",
4
4
  "buildInfo": {
5
5
  "projectName": "@lossless.org/nosqldb",
6
- "projectVersion": "10.1.1",
7
- "gitCommit": "594c38140cc22eb5e5cf1205875dcba9c331358e",
6
+ "projectVersion": "10.2.1",
7
+ "gitCommit": "ef25d0815dd8165c182614d6642abe18c5615d04",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-09-11T14:38:18.748Z",
9
+ "builtAt": "2026-09-19T16:13:35.123Z",
10
10
  "tsrustVersion": "1.13.0",
11
11
  "binary": "rustdb",
12
12
  "target": "linux_amd64"
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "format": "tsrust.build-provenance.v2",
3
- "binarySha256": "97cacd08b63456f933c644b34da1fa15b20d0da5d6d7fd617a63a2405befb078",
3
+ "binarySha256": "160da7da2c0d9459b4991d10a4b7b01fef31427a467628eebd0139fc77a37165",
4
4
  "buildInfo": {
5
5
  "projectName": "@lossless.org/nosqldb",
6
- "projectVersion": "10.1.1",
7
- "gitCommit": "594c38140cc22eb5e5cf1205875dcba9c331358e",
6
+ "projectVersion": "10.2.1",
7
+ "gitCommit": "ef25d0815dd8165c182614d6642abe18c5615d04",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-09-11T14:38:19.489Z",
9
+ "builtAt": "2026-09-19T16:13:35.856Z",
10
10
  "tsrustVersion": "1.13.0",
11
11
  "binary": "rustdb",
12
12
  "target": "linux_amd64_musl"
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "format": "tsrust.build-provenance.v2",
3
- "binarySha256": "7ff8dc0adf917bd35cd67de448f66d1a1327eed53d1bbaf4dded30fd79d3cd99",
3
+ "binarySha256": "6c289b3ffad0d852170c01760f110edc516f4b180a04f43527b54ddaac175c1d",
4
4
  "buildInfo": {
5
5
  "projectName": "@lossless.org/nosqldb",
6
- "projectVersion": "10.1.1",
7
- "gitCommit": "594c38140cc22eb5e5cf1205875dcba9c331358e",
6
+ "projectVersion": "10.2.1",
7
+ "gitCommit": "ef25d0815dd8165c182614d6642abe18c5615d04",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-09-11T14:38:19.119Z",
9
+ "builtAt": "2026-09-19T16:13:35.490Z",
10
10
  "tsrustVersion": "1.13.0",
11
11
  "binary": "rustdb",
12
12
  "target": "linux_arm64"
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "format": "tsrust.build-provenance.v2",
3
- "binarySha256": "5049fd8ab809455b3b967222776df485ce75657eb4684f5704867978ddd9025e",
3
+ "binarySha256": "b1eb1af3fd922012e6106adc320b7c99d0fabbda3bd67b2ca273e620bbef5127",
4
4
  "buildInfo": {
5
5
  "projectName": "@lossless.org/nosqldb",
6
- "projectVersion": "10.1.1",
7
- "gitCommit": "594c38140cc22eb5e5cf1205875dcba9c331358e",
6
+ "projectVersion": "10.2.1",
7
+ "gitCommit": "ef25d0815dd8165c182614d6642abe18c5615d04",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-09-11T14:38:19.867Z",
9
+ "builtAt": "2026-09-19T16:13:36.234Z",
10
10
  "tsrustVersion": "1.13.0",
11
11
  "binary": "rustdb",
12
12
  "target": "linux_arm64_musl"
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "format": "tsrust.build-provenance.v2",
3
- "binarySha256": "01856b90f9df1d96d1735d04e0f2f422115f5d928b7394a5689c6e8b87336843",
3
+ "binarySha256": "b330624335261bbc8bcd0ab6ae762016d13cd93ccb1e88e97c67c61fb59395f7",
4
4
  "buildInfo": {
5
5
  "projectName": "@lossless.org/nosqldb",
6
- "projectVersion": "10.1.1",
7
- "gitCommit": "594c38140cc22eb5e5cf1205875dcba9c331358e",
6
+ "projectVersion": "10.2.1",
7
+ "gitCommit": "ef25d0815dd8165c182614d6642abe18c5615d04",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-09-11T14:24:45.449Z",
9
+ "builtAt": "2026-09-19T15:59:40.927Z",
10
10
  "tsrustVersion": "1.13.0",
11
11
  "binary": "rustdb",
12
12
  "target": "macos_amd64"
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "format": "tsrust.build-provenance.v2",
3
- "binarySha256": "04cbf83f4809008f0fc747e6052555a246fadae7d7949d7ed231a45c45bf7623",
3
+ "binarySha256": "2b002fb776308218af8e447553ba8560e38239098adc96741ca8fc9e05bcd659",
4
4
  "buildInfo": {
5
5
  "projectName": "@lossless.org/nosqldb",
6
- "projectVersion": "10.1.1",
7
- "gitCommit": "594c38140cc22eb5e5cf1205875dcba9c331358e",
6
+ "projectVersion": "10.2.1",
7
+ "gitCommit": "ef25d0815dd8165c182614d6642abe18c5615d04",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-09-11T14:24:45.961Z",
9
+ "builtAt": "2026-09-19T15:59:41.466Z",
10
10
  "tsrustVersion": "1.13.0",
11
11
  "binary": "rustdb",
12
12
  "target": "macos_arm64"
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@lossless.org/nosqldb',
6
- version: '10.1.1',
6
+ version: '10.2.1',
7
7
  description: 'A MongoDB-compatible embedded database server with wire protocol support, backed by a high-performance Rust engine.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx1QkFBdUI7SUFDN0IsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHFIQUFxSDtDQUNuSSxDQUFBIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lossless.org/nosqldb",
3
- "version": "10.1.1",
3
+ "version": "10.2.1",
4
4
  "private": false,
5
5
  "description": "A MongoDB-compatible embedded database server with wire protocol support, backed by a high-performance Rust engine.",
6
6
  "exports": {
@@ -14,12 +14,12 @@
14
14
  "devDependencies": {
15
15
  "@api.global/typedserver": "^8.4.6",
16
16
  "@design.estate/dees-element": "^2.2.4",
17
- "@git.zone/tsbuild": "^4.4.2",
17
+ "@git.zone/tsbuild": "^4.5.0",
18
18
  "@git.zone/tsbundle": "^2.13.0",
19
19
  "@git.zone/tsrust": "^1.13.0",
20
- "@git.zone/tstest": "^6.0.0",
20
+ "@git.zone/tstest": "^6.1.1",
21
21
  "@lossless.org/client": "0.1.1",
22
- "@types/node": "26.4.1",
22
+ "@types/node": "26.5.1",
23
23
  "mongodb": "^7.5.0"
24
24
  },
25
25
  "dependencies": {
package/readme.md CHANGED
@@ -254,12 +254,7 @@ Each entry contains:
254
254
 
255
255
  The engine detects document rewrites that change nothing and skips them entirely — no storage write, no WAL append, no index update, and no oplog entry. A skipped rewrite still counts as matched (`matchedCount: 1`) but reports `modifiedCount: 0`.
256
256
 
257
- Two classes are skipped:
258
-
259
- - **Identical** — the post-image equals the stored document byte for byte.
260
- - **Volatile-only** — the post-image differs only in top-level volatile metadata fields (currently `_updatedAt`, the field ODM layers such as `@push.rocks/smartdata` restamp on every save). The stored document is kept as-is, including its existing `_updatedAt`, so the timestamp means "last real change" rather than "last save call".
261
-
262
- This makes periodic reconcile loops that re-save unchanged documents cost nothing at the engine level. A caller that needs a document to actually change must change a non-volatile field.
257
+ Only identical field values are skipped; top-level field order does not cause a write. Explicit changes to `_updatedAt` are persisted and returned just like changes to any other field. Applications decide when to advance their timestamps.
263
258
 
264
259
  Counters are exposed through `serverStatus`:
265
260
 
@@ -270,7 +265,7 @@ console.log(status.writes);
270
265
  // updatesWritten: 42, // rewrites that reached storage, index, and oplog
271
266
  // noopSkipped: {
272
267
  // identical: 1337, // post-image equal to the stored document
273
- // volatileOnly: 271, // only volatile metadata differed
268
+ // volatileOnly: 0, // retained metric; timestamp changes now write
274
269
  // },
275
270
  // }
276
271
  ```
@@ -279,6 +274,22 @@ console.log(status.writes);
279
274
 
280
275
  ## API Reference
281
276
 
277
+ ### Find execution plans and pooled cursors
278
+
279
+ `collection.find(filter).hint(index).sort(order).limit(count).explain('executionStats')`
280
+ uses the serving query planner and reports actual document and index-entry reads.
281
+ `queryPlanner` inspects the plan without executing it; `allPlansExecution` also
282
+ executes the selected plan, with an empty trial-execution list because selection
283
+ is deterministic. Explain currently supports `find` outside transactions.
284
+ Queries can use a compound index's sort prefix after equality-constrained fields,
285
+ and scalar `$in` predicates on single-field indexes use bounded, deduplicated point
286
+ lookups. Unsupported point shapes retain ordinary predicate evaluation.
287
+
288
+ Driver cursors belong to their logical session and authenticated principal
289
+ generations, so `getMore` can use another connection in the pool. Session
290
+ retirement, expiry, and shutdown release their cursors. Reads made without a
291
+ logical session retain connection ownership and disconnect cleanup.
292
+
282
293
  ### NoSqlDbServer
283
294
 
284
295
  The core server class. Manages the Rust database engine and exposes connection details.
@@ -690,7 +701,9 @@ Cancellation or restart retires unpublished staging through the owning native
690
701
  logic. Index aliases, empty namespaces and validated `system.views` definitions
691
702
  are preserved; view IDs are rebound when the database name changes. Keep exported
692
703
  objects as JSON values rather than coercing BSON numeric wrappers into JavaScript
693
- numbers. These APIs transfer database contents; they do not convert storage files.
704
+ numbers. Imported indexes retain their validated source catalog specification,
705
+ including BSON field order and an absent `v` field in legacy exports.
706
+ These APIs transfer database contents; they do not convert storage files.
694
707
 
695
708
  `getDatabaseContentDigest()` computes a bounded, database-name-independent SHA-256 over collection names, exact BSON document bytes, and persisted index specifications. Collection, document, and index enumeration order is normalized; BSON field order and compound-index key order remain significant. The physical `system.views` catalog is included, with only its already-validated deterministic database prefix removed from `_id` for hashing so a cross-name import retains the same digest. `INoSqlDbGetDatabaseContentDigestInput` accepts `databaseName` and optional `INoSqlDbDatabaseContentDigestLimits` fields `maxScannedBsonBytes`, `maxCollections`, `maxDocuments`, and `maxIndexes`. Callers may lower the server ceilings of 96 MiB scanned BSON, 10,000 collections, 1,000,000 documents, and 100,000 indexes. The `INoSqlDbDatabaseContentDigest` result reports format `smartdb.database.content-digest.v1`, algorithm `sha256`, the lowercase digest, and exact scan counters.
696
709
 
@@ -1420,10 +1433,11 @@ result document. Unindexed joins can still require repeated foreign scans.
1420
1433
  Facet branches replay a shared input buffer or temporary spool; their combined
1421
1434
  result must fit the BSON document budget.
1422
1435
 
1423
- Scalar ordered indexes can satisfy complete sort keys after equality fields,
1436
+ Scalar ordered indexes can satisfy a sort prefix after equality fields,
1424
1437
  including reverse traversal and mixed compound directions. This path currently
1425
- requires distinct full index keys to preserve stable equal-key ordering. Arrays,
1426
- unsupported BSON index types, and equal-key data use the general sort executor.
1438
+ requires distinct full index keys. Equal requested sort keys follow the remaining
1439
+ index columns; include a unique field in the sort when tie order matters. Arrays,
1440
+ unsupported BSON index types, and duplicate full index keys use the general sort executor.
1427
1441
  Numeric comparison and scalar equality indexes share exact Int32, Int64, Double,
1428
1442
  and Decimal128 ordering, including large integers, signed zero, and NaNs.
1429
1443
 
@@ -1695,7 +1709,7 @@ replication.
1695
1709
  ### Unsupported Administrative Commands
1696
1710
 
1697
1711
  NoSQLDB returns `CommandNotFound` (code 59) for the wire commands `validate`,
1698
- `explain`, legacy `authenticate`, `buildInfo`/`buildinfo`, `hostInfo`,
1712
+ legacy `authenticate`, `buildInfo`/`buildinfo`, `hostInfo`,
1699
1713
  `whatsmyuri`, `getLog`, `getCmdLineOpts`, `getParameter`, `setFreeMonitoring`,
1700
1714
  `currentOp`, `killOp`, `top`, `profile`, `compact`, `reIndex`, `fsync`, and
1701
1715
  `connPoolSync`. These commands previously had placeholder success responses but
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@lossless.org/nosqldb',
6
- version: '10.1.1',
6
+ version: '10.2.1',
7
7
  description: 'A MongoDB-compatible embedded database server with wire protocol support, backed by a high-performance Rust engine.'
8
8
  }