Install and Set Up LoraDB
Overview
LoraDB is one Rust engine with bindings for the major application runtimes — Node.js, Python, WebAssembly, Go, and Ruby — plus a standalone HTTP server and direct embedding from Rust. Every binding shares the same parser, planner, executor, and result shape, so switching hosts later is a mechanical translation. This page helps you pick; each binding guide covers install, connect, execute, and error handling end-to-end.
Installation / Setup
Pick a platform
| Platform | Package | Install | Guide |
|---|---|---|---|
| Node / TS | npm install @loradb/lora-node | Node → | |
| Python | pip install lora-python | Python → | |
| Browser / WASM | npm install @loradb/lora-wasm | WASM → | |
| Go | pkg.go.dev | go get github.com/lora-db/lora/crates/lora-go | Go → |
| Ruby | gem install lora-ruby | Ruby → |
Click any badge to jump to its package-registry page. Each platform guide also documents repo-local build steps for contributors working from a clone.
Which to pick?
| If you… | Pick |
|---|---|
| Ship a Node server / CLI | Node.js |
| Build in Python (sync or asyncio) | Python |
| Run in the browser / Web Worker / edge | WASM |
| Build a Go service or CLI (cgo) | Go |
| Ship a Ruby app, worker, or Rails service | Ruby |
All bindings share the same query surface and result shape — the Cypher is identical, only the host-language wrapper differs.
Other runtimes
Two more paths share the same Cypher surface:
- Rust crate — embed
lora-databasedirectly in a Rust binary for the lowest-overhead option. - HTTP server — run
lora-serverandPOST /queryfrom any language.
Creating a Client / Connection
Every binding exposes the same two primitives:
- A
Databasewithexecute(query, params?). - A result:
{ columns, rows }, where each row maps column name → typed value.
See each platform guide for the language-specific shape.
Running Your First Query
CREATE (:Person {name: 'Ada'})
MATCH (p:Person) RETURN p.name
In any binding that's two execute calls; the platform guide shows
the language-specific syntax.
Examples
Shared value model
Typed values follow one contract (defined in
crates/shared-ts/types.ts): primitives, lists/maps, graph entities
(tagged {kind: "node" | "relationship" | "path"}), temporals
(tagged {kind: "date" | "datetime" | ...}), and points (tagged
{kind: "point", srid, crs, ...}).
See Data Types Overview for the full catalogue and each binding's parameters section for how host values map in.
Common Patterns
One process, one graph
Each binding defaults to one process, one in-memory graph.
Parallel queries on the same handle serialise on a mutex — spawn
multiple Database instances for read parallelism.
If you want persistence, opt into it explicitly:
- on
lora-node, pass a database name and database directory tocreateDatabase('app', { databaseDir: './data' }); - on Rust /
lora-server, configure a WAL directory; - on Python, Go, and Ruby, pass a database name plus their
database_dir/DatabaseDiroption;
Bulk-load from the host
The idiomatic large-write shape across every binding is
UNWIND $rows AS row CREATE ….
The $rows parameter comes from a plain list in the host language.
Share a database across modules
Wrap the handle in whatever sharing primitive your language provides
— Arc in Rust, a module singleton in Node/Python, a Worker in the
browser.
Error Handling
Every binding exposes two error layers:
- Query-level errors — parse, semantic, or runtime — surface the engine's message. Typical cases live in Troubleshooting.
- Connection / host-level errors — language-specific (HTTP status, FFI exceptions, spawn failures). Each platform guide covers its own.
Performance / Best Practices
- Persistence depends on the binding. Point-in-time snapshots via
save_snapshot/load_snapshotexist on every binding (byte-based on WASM). Continuous durability via WAL exists on every filesystem-backed binding: Rust,lora-node, Python, Go, Ruby, andlora-server. WASM remains snapshot-only. See Limitations → Storage. - No query cancellation. Once dispatched, queries run to
completion. Keep queries bounded (
LIMIT,*..Ncaps). - Parameters, not string interpolation. The only safe way to mix untrusted input into a query.
See also
- Ten-Minute Tour — guided walkthrough.
- Graph Model — what lives in the graph.
- Query Examples — copy-paste recipes.
- Cookbook — scenario-based recipes.
- Data Types — values and parameters.
- Troubleshooting — when something goes wrong.