Registry / database / zyxdb
library0.1.25jsnpmunverified

Node.js native bindings for ZYX graph database, a high-performance embeddable graph database engine with Cypher query support. Current stable version is 0.1.25, with prebuilt binaries for Linux (x64 glibc), macOS (ARM64), and Windows (x64 MSVC). Requires Node >= 18. Uses native addon (N-API) for performance and supports TypeScript types. Differentiators: embeddable (no server process), full Cypher support, transactions (read-write and read-only), shortest path queries, batch operations, and native performance. Alternative to Neo4j for embedded use cases.

npm install zyxdb
INSTALL
IMPORT
SIG · ZYXDB
Z
zyxdb
databasejavascriptv0.1.25
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Database
import { Database } from 'zyxdb'
const db = require('zyxdb')
ESM import is correct. Default import is not available; always use named import.
Transaction
import { Transaction } from 'zyxdb'
Transaction type is importable for TypeScript usage but not typically instantiated directly.
Node
import { Node } from 'zyxdb'
Node type used in path results from getShortestPath.

Demonstrates basic usage: database creation, node/edge creation, Cypher query, and transactions.

import { Database } from 'zyxdb'; async function main() { const db = new Database('/tmp/movies'); await db.open(); // Create nodes and edges const alice = await db.createNode('Person', { name: 'Alice', age: 30 }); const bob = await db.createNode('Person', { name: 'Bob', age: 25 }); await db.createEdge(alice, bob, 'FRIENDS_WITH'); // Cypher query await db.execute('CREATE (m:Movie {title: $title, year: $year})', { title: 'The Matrix', year: 1999 }); // Transaction const tx = await db.beginTransaction(); await tx.execute("MATCH (p:Person {name: 'Alice'}), (m:Movie {title: 'The Matrix'}) CREATE (p)-[:RATED {score: 9.5}]->(m)"); await tx.commit(); // Read result const result = await db.execute('MATCH (p:Person)-[r:RATED]->(m:Movie) RETURN p.name AS person, r.score AS score'); for (const row of result) { console.log(`${row.person} rated ${row.score}`); } await db.close(); } main().catch(console.error);
Debug
Known issues
gotchaDatabase path must be a writable directory; the database creates files in that directory. If the path does not exist, open() will fail.
fix
Ensure the directory exists before calling open(), or use a path that can be created (the library does not automatically create parent directories).
affects: >=0.0.0
gotchaPrebuilt binaries are limited to specific platforms: Linux x64 (glibc), macOS ARM64, Windows x64 (MSVC). Other platforms require building from source with CMake and C++20 compiler.
fix
On unsupported platforms, build from source: cd bindings/nodejs && npm install
affects: <0.2.0
gotchaOnly one database instance per path should be opened at a time. Opening multiple instances on the same path may cause data corruption.
fix
Use a single Database instance per path. If you need multiple connections, consider using the same instance.
affects: =0.1.0
gotchaResult objects from execute() are iterable only once. Iterating a second time yields no rows.
fix
Collect results into an array with Array.from(result) if you need to iterate multiple times.
affects: >=0.0.0
gotchaParameters in Cypher queries must be passed as an object with keys matching the parameter names. Using positional parameters (e.g., $1) is not supported; the library only supports named parameters.
fix
Use named parameters in the query and pass an object with matching keys.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'zyxdb'
Package not installed or prebuilt binary unavailable for platform.
fix
Run `npm install zyxdb` and ensure your platform is supported (Linux x64 glibc, macOS ARM64, Windows x64 MSVC). If not, build from source.
Error: The specified module could not be found. (os error 126)
Missing native binary or missing system dependencies (e.g., glibc version mismatch on Linux).
fix
Reinstall the package: `npm rebuild zyxdb`. Ensure glibc >= 2.28 on Linux.
Upgrade
Version history
0.1.25latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
46 hits · last 30 days
node
38
OpenAI (training)
1
Resources
packagezyxdb
zyxdb — npm install zyxdb · libregistry