Skip to main content

Crate lora_database

Crate lora_database 

Source
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.
DatabaseName
Validated logical database name/path.
DatabaseOpenOptions
Options for opening a named filesystem-backed database.
EncryptionKey
ExecuteOptions
InMemoryGraph
LoraError
Public error type at the lora-database boundary.
NodeRecord
OperatorMetrics
Per-operator metrics. Reserved for a future phase; today no operator populates this.
PasswordKdfParams
PlanTree
Top-level plan tree.
PlanTreeNode
One node in the rendered plan tree.
ProfileMetrics
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.
QueryPlan
Result of Database::explain.
QueryProfile
Result of Database::profile.
QueryStream
Owning row stream returned by crate::Database::stream and transaction streaming methods.
RelationshipRecord
Row
Row layout: a positional vector indexed by VarId.0. Two reasons this beats the previous BTreeMap<VarId, RowEntry>:
SnapshotConfig
SnapshotInfo
SnapshotMeta
Metadata reported by snapshot encode / decode entry points. Kept small and stable so callers can log / diff it without reflecting on the payload.
SnapshotOptions
SnapshotPassword
Transaction
Explicit transaction over the in-memory graph.
WalStatus
Snapshot of WAL state returned by WalAdmin::wal_status.

Enums§

Compression
DatabaseNameError
GraphDirection
LoraErrorCategory
Whether a LoraErrorCode represents a caller-visible mistake or an engine-side failure. Used by the HTTP transport to choose between 4xx and 5xx status codes.
LoraErrorCode
Stable error-code catalog. The wire string returned by Self::as_str is 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.
LoraValue
PlanShape
Whether a compiled plan is read-only or potentially mutates the graph. Mirrors lora_executor::StreamShape but stays a stable public surface for bindings that don’t pull in the executor crate.
QueryResult
ResultFormat
SnapshotByteFormat
Magic-byte sniff for snapshot bytes. The legacy in-store LORASNAP codec was removed in favour of the columnar lora-snapshot format, so this collapses to a single recognized variant; kept as a typed detect for forward compatibility if a future format is introduced.
SnapshotEncryption
SnapshotError
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.
SyncMode
Durability mode for committed transactions.
TransactionError
Transaction-lifecycle invariant violations.
TransactionMode
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§

QueryRunner
Minimal abstraction any transport can depend on to run Lora queries.
SnapshotAdmin
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 / encryption so 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.

Type Aliases§

NodeId
RelationshipId
SnapshotCredentials