pub struct InMemoryEngine {
pub graph: Graph,
pub params: HashMap<String, Value>,
}Expand description
Reference in-memory engine for integration testing and conformance validation.
This engine prioritizes correctness and readability over performance. It uses O(n) linear scans for entity lookups and clones row sets between pipeline stages. Do not use as a template for production engine performance patterns.
Production engines should implement PlanEngine (and optionally
MutationEngine) against their own storage, or use the StorageAdapter
trait for property-graph mapping. See docs/engine-implementor-guide.md.
Fields§
§graph: Graph§params: HashMap<String, Value>Implementations§
Trait Implementations§
Source§impl Clone for InMemoryEngine
impl Clone for InMemoryEngine
Source§fn clone(&self) -> InMemoryEngine
fn clone(&self) -> InMemoryEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryEngine
impl Debug for InMemoryEngine
Source§impl Default for InMemoryEngine
impl Default for InMemoryEngine
Source§fn default() -> InMemoryEngine
fn default() -> InMemoryEngine
Returns the “default value” for a type. Read more
Source§impl MutationEngine for InMemoryEngine
impl MutationEngine for InMemoryEngine
type Error = ExecutionError
fn create_node( &mut self, labels: &[String], props: HashMap<String, Value>, ) -> Result<u64, Self::Error>
fn create_rel( &mut self, src: u64, dst: u64, rel_type: &str, props: HashMap<String, Value>, ) -> Result<u64, Self::Error>
fn merge_pattern( &mut self, pattern: &Expr, on_create_props: &Expr, on_match_props: &Expr, schema: &[ColDef], row: &Row, ) -> Result<(), Self::Error>
fn delete_entity( &mut self, target: &Value, detach: bool, ) -> Result<(), Self::Error>
fn set_property( &mut self, target: &Value, key: &str, value: Value, ) -> Result<(), Self::Error>
fn remove_property( &mut self, target: &Value, key: &str, ) -> Result<(), Self::Error>
Source§impl PlanEngine for InMemoryEngine
impl PlanEngine for InMemoryEngine
type Error = ExecutionError
Source§fn execute_plan(&mut self, plan: &Plan) -> Result<QueryResult, Self::Error>
fn execute_plan(&mut self, plan: &Plan) -> Result<QueryResult, Self::Error>
Execute a deserialized plan.
Auto Trait Implementations§
impl Freeze for InMemoryEngine
impl RefUnwindSafe for InMemoryEngine
impl Send for InMemoryEngine
impl Sync for InMemoryEngine
impl Unpin for InMemoryEngine
impl UnsafeUnpin for InMemoryEngine
impl UnwindSafe for InMemoryEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more