A complete walkthrough for evaluating nedb-engine — from git clone to live-registry installs to real tests and benchmarks you ran yourself. Every command below is the same one the repo's own CI runs. Nothing here asks you to trust a claim.
The canonical repo — engine, Rust core, the test suites, the benchmark scripts, the vendored PostgreSQL grammar.
$ git clone https://github.com/aiassistsecure/nedb $ cd nedb $ git log --oneline -1 # you are on the same master the releases ship from
git tag — the release history is the audit trail.Evaluate what users get. Three registries, same version, same tag — the tri-distribution discipline.
pip install nedb-engine
npm install nedb-engine
cargo add nedb-engine
$ python3 -m venv venv && source venv/bin/activate $ pip install nedb-engine $ python3 -c "import nedb; print(nedb.__version__)" 9.0.0 $ which nesql nedbd # the CLI + daemon binaries ride along
$ mkdir nedb-node-demo && cd nedb-node-demo && npm init -y $ npm install nedb-engine $ node -e "const {NedbCore}=require('nedb-engine'); console.log('loaded ok')"
nesql CLI binary is on your PATH — the same compiled Rust binary the engine's release train stages into every wheel and tarball.60 seconds of actual usage: every core claim of the README, executed by you.
$ python3 <<'EOF' from nedb import NEDB db = NEDB("./mydata") # durable, hash-chained db.put("users", "alice", {"name": "Ann", "age": 31}) snap = db.seq # time travel marker db.put("users", "alice", {"name": "Ann", "age": 32}) print(db.get("users", "alice", as_of=snap)["age"]) # → 31 — the past is reachable db.put("inputs", "m1", {"text": "prefers dark mode"}) seq = db.seq db.put("beliefs", "b1", {"v": 1}, caused_by=[seq]) # causal edge print(db.query('FROM beliefs WHERE _id = "b1" TRACE caused_by')) print("verify:", db.verify()) # → True — chain intact EOF
$ node -e " const { NedbCore } = require('nedb-engine'); const db = new NedbCore(); db.put('users','bob', JSON.stringify({age:24})); console.log('rows:', db.query('FROM users WHERE age > 20').length); // 1 console.log('verify:', db.verify()); // true "
db.verify(). Flip a byte in ./mydata with a hex editor and run it again — the verdict flips to False. Tamper evidence you can break on purpose.The same store, spoken to in PostgreSQL SQL and the FROM-form — routed structurally, no flags.
$ nesql --db ./mydata query "SELECT name, age FROM users ORDER BY age DESC" {"name":"Ann","age":32} (1 rows) $ nesql --db ./mydata query "FROM users WHERE age > 30" {...} (1 rows, 1 scanned) $ nesql --db ./mydata version nesql 9.0.0 · engine 9.0.0 · grammar_v1 (digest)
0 success · 1 failure · 2 usage · 3 could-not-determine · 4 not found · 5 unsupported. Try nesql --db ./mydata get nosuch coll and check echo $?.The repo's own gates. These are the suites CI runs on every push — now you run them too.
$ cd nedb $ python3 tests/test_nedb.py # engine core 11/11 passed $ python3 tests/test_bitemporal.py # both time axes 28/28 passed $ python3 tests/test_nql_predicates.py # cross-engine parity 257 passed $ python3 tests/test_nql_shaping.py 157 passed $ python3 tests/test_wallclock_as_of.py # AS OF by datetime 25/25 passed
$ cd rust $ cargo test -p nedb-engine --lib 639 passed $ cargo test -p nedb-engine --tests # integration, real subprocesses all targets green
test_nql_predicates and test_nql_shaping run the same battery through the Python reference and the Rust core and assert identical answers — the guarantee that the two engines cannot quietly disagree.Every published number in the repo names its machine and command. Produce your own.
$ python3 bench/benchmarks.py --save # PUT ~63K/s · GET ~1.3M/s · AS OF (time-travel) reads ~940K/s # your absolute numbers will differ; the RATIOS are the claim: # time-travel reads cost ~30%, not 10x
$ NEDBD_DAG=1 nedbd --data /tmp/perf & $ python3 tests/test_dag_perf.py --n 10000 --reads 100000 # sequential writes · point reads · batch · tamper-verify throughput
$ python3 scripts/bench_index_range.py # point lookup 137ms → 0.01ms · BETWEEN 1% 186ms → 1.1ms
bench/RESULTS.md, docs/BENCH-sqlselect.md). If your numbers diverge wildly from the published ratios, that's a finding — file it.The complete CI surface: daemon HTTP, PostgreSQL wire, RESP2, encryption, crash boundaries.
$ NEDBD_DAG=1 nedbd --data ./nedb-data & # v2 DAG engine $ curl http://127.0.0.1:7070/health {"ok":true,"version":"9.0.0","engine":"dag",...} $ curl -X POST http://127.0.0.1:7070/v1/databases/shop/query \\ -H 'Content-Type: application/json' \\ -d '{"nql":"SELECT 1"}' # SQL over HTTP $ NEDBD_RESP2_PORT=6380 nedbd --data ./nedb-data & # + redis-cli compat $ redis-cli -p 6380 EVAL 'FROM orders LIMIT 5' 0 $ python3 tests/test_pgwire.py # real psql/libpq client