Expand description
In-memory Lora database — the database-facing orchestration layer.
lora-database owns the parse → analyze → compile → execute pipeline
and exposes a single Database entry point that transports (HTTP,
benches, examples, embedded callers) can drive without knowing about the
underlying crates.
§Quick start
use lora_database::Database;
let db = Database::in_memory();
db.execute("CREATE (:User {name: 'alice'})", None).unwrap();Structs§
- Database
- Owns the graph store and orchestrates parse → analyze → compile → execute.
- Database
Name - Validated logical database name/path.
- Database
Open Options - Options for opening a named filesystem-backed database.
- Encryption
Key - Execute
Options - InMemory
Graph - Lora
Error - Public error type at the
lora-databaseboundary. - Node
Record - Operator
Metrics - Per-operator metrics. Reserved for a future phase; today no operator populates this.
- Password
KdfParams - Plan
Tree - Top-level plan tree.
- Plan
Tree Node - One node in the rendered plan tree.
- Profile
Metrics - Coarse-grained per-query runtime metrics. v1 reports totals, not per-operator timings; per-operator instrumentation is reserved for a future phase that will not change the public surface.
- Query
Plan - Result of
Database::explain. - Query
Profile - Result of
Database::profile. - Query
Stream - Owning row stream returned by
crate::Database::streamand transaction streaming methods. - Relationship
Record - Row
- Row layout: a positional vector indexed by
VarId.0. Two reasons this beats the previousBTreeMap<VarId, RowEntry>: - Snapshot
Config - Snapshot
Info - Snapshot
Meta - Metadata reported by snapshot encode / decode entry points. Kept small and stable so callers can log / diff it without reflecting on the payload.
- Snapshot
Options - Snapshot
Password - Transaction
- Explicit transaction over the in-memory graph.
- WalStatus
- Snapshot of WAL state returned by
WalAdmin::wal_status.
Enums§
- Compression
- Database
Name Error - Graph
Direction - Lora
Error Category - Whether a
LoraErrorCoderepresents a caller-visible mistake or an engine-side failure. Used by the HTTP transport to choose between 4xx and 5xx status codes. - Lora
Error Code - Stable error-code catalog. The wire string returned by
Self::as_stris part of LoraDB’s public API. Consumers — bindings, the HTTP layer, integration tests — should match on this rather than on the message text, which is allowed to change between releases. - Lora
Value - Plan
Shape - Whether a compiled plan is read-only or potentially mutates the
graph. Mirrors
lora_executor::StreamShapebut stays a stable public surface for bindings that don’t pull in the executor crate. - Query
Result - Result
Format - Snapshot
Byte Format - Magic-byte sniff for snapshot bytes. The legacy in-store
LORASNAPcodec was removed in favour of the columnarlora-snapshotformat, so this collapses to a single recognized variant; kept as a typed detect for forward compatibility if a future format is introduced. - Snapshot
Encryption - Snapshot
Error - Errors a backend may surface while building or restoring a snapshot
payload. Codec-level errors live in [
lora-snapshot]; these are the store-side payload-shaped failures. - Sync
Mode - Durability mode for committed transactions.
- Transaction
Error - Transaction-lifecycle invariant violations.
- Transaction
Mode - Transaction execution mode.
- WalConfig
- Configuration for opening a
Wal.
Constants§
- DATABASE_
SNAPSHOT_ MAGIC - DEFAULT_
DATABASE_ MAX_ BYTES - Hard ceiling for one portable database archive/root.
Traits§
- Query
Runner - Minimal abstraction any transport can depend on to run Lora queries.
- Snapshot
Admin - Storage-agnostic admin surface for HTTP / binding callers that want to drive snapshot operations without naming the backend type parameter.
- WalAdmin
- Storage-agnostic admin surface for the WAL.
Functions§
- parse_
query - resolve_
database_ path - snapshot_
credentials_ from_ json - Build snapshot load credentials from the JSON shape used by the language
bindings. The credential object may be supplied directly, or under
credentials/encryptionso the same options object can be reused for save and load. - snapshot_
options_ from_ json - Build snapshot save options from the JSON shape used by the language bindings.