nedb-engine 2.1.0 → 2.2.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/index.d.ts CHANGED
@@ -4,28 +4,26 @@
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
6
  export declare class NedbCore {
7
- /** Create an in-memory database. */
7
+ /** Create an in-memory v2 DAG database — zero disk I/O. */
8
8
  constructor()
9
- /** Open a durable database at `path` (AOF persistence). */
9
+ /**
10
+ * Open a durable v2 DAG database at `path`.
11
+ * Automatically migrates v1 AOF → v2 DAG on first open.
12
+ */
10
13
  static open(path: string): NedbCore
11
14
  createIndex(coll: string, field: string, kind: string): void
12
- /** Auto-nonce put. `doc_json` is a JSON object string. Returns the stored doc. */
15
+ /** Put a document. Returns the stored doc as a JSON string. */
13
16
  put(coll: string, id: string, docJson: string): string
14
- /** Full put with optional client / nonce / idempotency key. */
17
+ /** Full put with optional client / nonce API compat, v2 ignores these. */
15
18
  putEx(coll: string, id: string, docJson: string, client?: string | undefined | null, nonce?: bigint | undefined | null, idem?: string | undefined | null): string
16
19
  delete(coll: string, id: string): void
17
20
  deleteEx(coll: string, id: string, client?: string | undefined | null, nonce?: bigint | undefined | null, idem?: string | undefined | null): void
21
+ /** Link: stored as a doc in __links__ collection for NQL traversal. */
18
22
  link(frm: string, rel: string, to: string): void
19
23
  unlink(frm: string, rel: string, to: string): void
20
24
  get(coll: string, id: string): string | null
21
- /** Time-travel: return the document as it was at sequence `as_of`. */
22
25
  getAsOf(coll: string, id: string, asOf: bigint): string | null
23
- /**
24
- * Execute an NQL query string. Returns an array of JSON document strings.
25
- * Full grammar supported: WHERE, ORDER BY, LIMIT, GROUP BY, TRAVERSE,
26
- * SEARCH, AS OF, VALID AS OF, TRACE caused_by.
27
- */
28
- query(nql: string): Array<string>
26
+ query(nqlStr: string): Array<string>
29
27
  neighbors(frm: string, rel: string): Array<string>
30
28
  neighborsAsOf(frm: string, rel: string, asOf: bigint): Array<string>
31
29
  inbound(to: string, rel: string): Array<string>
@@ -33,5 +31,6 @@ export declare class NedbCore {
33
31
  verify(): boolean
34
32
  head(): string
35
33
  seq(): bigint
34
+ /** Flush WAL and MANIFEST — v2 equivalent of v1 flush(). */
36
35
  flush(): void
37
36
  }
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nedb-engine",
3
- "version": "2.1.0",
3
+ "version": "2.2.3",
4
4
  "description": "NEDB — hash-chained, time-traveling, bi-temporal embedded database with Rust native core. SQL, Redis, MongoDB adapters. Causal Write Provenance. RESP2 wire protocol.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",