pub trait MutationEngine {
type Error: Error + Send + Sync + 'static;
// Required methods
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>;
}Expand description
Optional mutation capability for engines that execute DML ops.