Skip to main content

Crate relate_engine_api

Crate relate_engine_api 

Source
Expand description

Contracts a query engine and a write engine share.

The in-memory query engine and the local write engine are the only implementations. A later engine implements these traits in its own crate. Nothing here names a concrete graph or a concrete log.

Re-exports§

pub use catalog_image::map_put_database;
pub use catalog_image::SchemaSnapshot;
pub use catalog_image::ShowSchema;
pub use catalog_image::TheaterData;
pub use graph_type::canonical_default_clause;
pub use graph_type::DefaultValue;
pub use graph_type::GraphTypeSpec;
pub use redo::legacy_property_encoding;
pub use redo::props_from_json;
pub use redo::props_json;
pub use redo::split_legacy_property_encoding;
pub use redo::CatalogName;
pub use redo::IndexDetailSpec;
pub use redo::IndexKindSpec;
pub use redo::OntologyOp;
pub use redo::PullKind;
pub use redo::RedoOp;
pub use redo::WriteTarget;
pub use redo::MAX_ONTOLOGY_SPEC_BYTES;

Modules§

graph_type
Persisted graph-type model shared by query engines and snapshot codecs. Semantic validation and derivation stay with the in-memory engine.
redo
Physical redo ops for the WAL (ADR-0012). Not Cypher text.

Structs§

CommitGroup
One group’s redo, captured against the snapshot the statement read.
CommitRecord
CommittedSlot
The clock value the log assigned to one group.
EngineIds
The pair a manifest records. Absent fields mean the historical engines.
ReadRequest
A read the facade has already planned and admitted.
SchemaSnapshot
Catalog facts captured alongside an entity pin at read admission. The caller serializes capture with commit publication; execution needs no publication lock and never consults newer named schema.
ShowSchema
The read-admission SHOW metadata: the store-level databases table plus the graph’s committed theater maps, captured at one admission point. Composes TheaterData the way [CheckpointTheater] does, so the five maps exist once. Speculative catalog redo is applied by the query engine that owns derivation; committed state changes only when that engine applies redo.
TheaterData
The five committed per-graph SHOW-metadata maps that make up a checkpoint theater. Composed by the live graph state (a plain TheaterData), the serialized checkpoint image (CheckpointTheater’s flattened data) and the read-admission snapshot (ShowSchema’s data). The databases table is NOT here: it is the store-level databases table (ADR-0276).
WriteRequest
A write the facade has already planned. scratch is the engine’s private transaction state.

Enums§

FollowBatch
What a follower poll returns.
QueryEngineId
WriteEngineId

Constants§

LOCAL_WRITE_ENGINE
Write engine identity stored in a checkpoint manifest.
MEMORY_QUERY_ENGINE
Query engine identity stored in a checkpoint manifest.

Traits§

GraphExport
GraphImport
The fill side of a graph: what a codec installs checkpoint rows through. Sync because the restore installs one worker’s rows per core — a slice’s install is the same interior-mutable call the single-threaded path made.
QueryEngine
SnapshotGraph
A graph a codec can both read and fill. Default builds the empty engine recovery starts from.
WriteEngine

Functions§

map_put_database
ADR-0116 §8: record a namespace’s default language in map. The redo name is the serde/replay boundary: it matches the fixed namespaces case-insensitively and is stored under the typed key; entries for any other name (written by earlier CREATE DATABASE calls or an older binary) are dropped here.