graphdblite
v0.1.1
Published
Embedded graph database with Cypher support
Maintainers
Readme
graphdblite
Embedded graph database with Cypher query support, backed by SQLite.
- Embedded. Single file, no server, no configuration — like SQLite.
- Graph-first. Cypher queries, adjacency-list storage, graph-aware query planning.
- Multi-process safe. Multiple processes can read and write concurrently. ACID via SQLite.
- openCypher TCK conformance: 100% (3895/3895 scenarios).
Install
npm install graphdblitePre-built native addons are published for Linux (glibc + musl, x86_64 + aarch64), macOS (x86_64 + aarch64), and Windows (x86_64). npm resolves the right one for your platform automatically.
Quick start
const { Database } = require('graphdblite');
const db = new Database('my.db');
db.execute("CREATE (a:Person {name: 'Alice'})-[:KNOWS]->(b:Person {name: 'Bob'})");
const results = db.query('MATCH (a)-[:KNOWS]->(b) RETURN a.name, b.name');
for (const row of results) {
console.log(row['a.name'], '→', row['b.name']);
}
db.close();Cypher coverage
MATCH (a:Person)-[:KNOWS]->(b:Person) WHERE a.age > 25 RETURN a.name, b.name
MATCH (a)-[:KNOWS*1..3]->(b) RETURN b // variable-length paths
MATCH p = shortestPath((a)-[:KNOWS*]->(b)) RETURN p // shortest path
MERGE (n:Person {name: 'Alice'}) ON CREATE SET n.created = trueClauses, expressions, 50+ functions, full reference: Cypher reference.
Documentation
- Node.js API: https://github.com/ds7n/graphdblite/blob/main/docs/node.md
- Architecture: https://github.com/ds7n/graphdblite/blob/main/docs/architecture.md
- Repository: https://github.com/ds7n/graphdblite
- Issues: https://github.com/ds7n/graphdblite/issues
