{"id":42367,"library":"zyxdb","title":"zyxdb","description":"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.","status":"active","version":"0.1.25","language":"javascript","source_language":"en","source_url":"https://github.com/nexepic/zyx","tags":["javascript","graph","database","cypher","native","addon","typescript"],"install":[{"cmd":"npm install zyxdb","lang":"bash","label":"npm"},{"cmd":"yarn add zyxdb","lang":"bash","label":"yarn"},{"cmd":"pnpm add zyxdb","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM import is correct. Default import is not available; always use named import.","wrong":"const db = require('zyxdb')","symbol":"Database","correct":"import { Database } from 'zyxdb'"},{"note":"Transaction type is importable for TypeScript usage but not typically instantiated directly.","symbol":"Transaction","correct":"import { Transaction } from 'zyxdb'"},{"note":"Node type used in path results from getShortestPath.","symbol":"Node","correct":"import { Node } from 'zyxdb'"}],"quickstart":{"code":"import { Database } from 'zyxdb';\n\nasync function main() {\n    const db = new Database('/tmp/movies');\n    await db.open();\n\n    // Create nodes and edges\n    const alice = await db.createNode('Person', { name: 'Alice', age: 30 });\n    const bob   = await db.createNode('Person', { name: 'Bob',   age: 25 });\n    await db.createEdge(alice, bob, 'FRIENDS_WITH');\n\n    // Cypher query\n    await db.execute('CREATE (m:Movie {title: $title, year: $year})', { title: 'The Matrix', year: 1999 });\n\n    // Transaction\n    const tx = await db.beginTransaction();\n    await tx.execute(\"MATCH (p:Person {name: 'Alice'}), (m:Movie {title: 'The Matrix'}) CREATE (p)-[:RATED {score: 9.5}]->(m)\");\n    await tx.commit();\n\n    // Read result\n    const result = await db.execute('MATCH (p:Person)-[r:RATED]->(m:Movie) RETURN p.name AS person, r.score AS score');\n    for (const row of result) {\n        console.log(`${row.person} rated ${row.score}`);\n    }\n\n    await db.close();\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates basic usage: database creation, node/edge creation, Cypher query, and transactions."},"warnings":[{"fix":"Ensure the directory exists before calling open(), or use a path that can be created (the library does not automatically create parent directories).","message":"Database path must be a writable directory; the database creates files in that directory. If the path does not exist, open() will fail.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"On unsupported platforms, build from source: cd bindings/nodejs && npm install","message":"Prebuilt 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.","severity":"gotcha","affected_versions":"<0.2.0"},{"fix":"Use a single Database instance per path. If you need multiple connections, consider using the same instance.","message":"Only one database instance per path should be opened at a time. Opening multiple instances on the same path may cause data corruption.","severity":"gotcha","affected_versions":"=0.1.0"},{"fix":"Collect results into an array with Array.from(result) if you need to iterate multiple times.","message":"Result objects from execute() are iterable only once. Iterating a second time yields no rows.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use named parameters in the query and pass an object with matching keys.","message":"Parameters 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.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.1.25':25 '18':41 'addon':44,90 'altern':78 'api':47 'arm64':34 'batch':73 'binari':28 'bind':4 'case':84 'current':21 'cypher':18,60,88 'databas':8,15,87 'differenti':54 'embed':82 'embedd':13,55 'engin':16 'full':59 'glibc':32 'graph':7,14,86 'high':11 'high-perform':10 'javascript':85 'linux':30 'maco':33 'msvc':38 'n':46 'n-api':45 'nativ':3,43,76,89 'neo4j':80 'node':40 'node.js':2 'oper':74 'path':71 'perform':12,49,77 'prebuilt':27 'process':58 'queri':19,72 'read':64,68 'read-on':67 'read-writ':63 'requir':39 'server':57 'shortest':70 'stabl':22 'support':20,51,61 'transact':62 'type':53 'typescript':52,91 'use':42,83 'version':23 'window':36 'write':65 'x64':31,37 'zyx':6 'zyxdb':1","created_at":"2026-06-04T18:56:54.891781+00:00","updated_at":"2026-06-04T18:56:54.891781+00:00","problems":[{"fix":"Run `npm install zyxdb` and ensure your platform is supported (Linux x64 glibc, macOS ARM64, Windows x64 MSVC). If not, build from source.","cause":"Package not installed or prebuilt binary unavailable for platform.","error":"Error: Cannot find module 'zyxdb'"},{"fix":"Reinstall the package: `npm rebuild zyxdb`. Ensure glibc >= 2.28 on Linux.","cause":"Missing native binary or missing system dependencies (e.g., glibc version mismatch on Linux).","error":"Error: The specified module could not be found. (os error 126)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/nexepic/zyx#readme","github":"https://github.com/nexepic/zyx","docs":null,"changelog":null,"pypi":null,"npm":"zyxdb","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}