pub struct WriteTxn { /* private fields */ }Expand description
Explicit write transaction handle.
A transaction stages logical graph intents locally. Staging, rollback, and bounded reads do not append WAL records or mutate live engine state.
Implementations§
Source§impl WriteTxn
impl WriteTxn
pub fn upsert_node<L>(
&mut self,
labels: L,
key: &str,
options: UpsertNodeOptions,
) -> Result<TxnNodeRef, EngineError>where
L: IntoNodeLabels,
pub fn upsert_node_as<L>(
&mut self,
alias: &str,
labels: L,
key: &str,
options: UpsertNodeOptions,
) -> Result<TxnNodeRef, EngineError>where
L: IntoNodeLabels,
pub fn add_node_label( &mut self, target: TxnNodeRef, label: &str, ) -> Result<bool, EngineError>
pub fn remove_node_label( &mut self, target: TxnNodeRef, label: &str, ) -> Result<bool, EngineError>
pub fn upsert_edge( &mut self, from: TxnNodeRef, to: TxnNodeRef, label: &str, options: UpsertEdgeOptions, ) -> Result<TxnEdgeRef, EngineError>
pub fn upsert_edge_as( &mut self, alias: &str, from: TxnNodeRef, to: TxnNodeRef, label: &str, options: UpsertEdgeOptions, ) -> Result<TxnEdgeRef, EngineError>
pub fn delete_node(&mut self, target: TxnNodeRef) -> Result<(), EngineError>
pub fn delete_edge(&mut self, target: TxnEdgeRef) -> Result<(), EngineError>
pub fn invalidate_edge( &mut self, target: TxnEdgeRef, valid_to: i64, ) -> Result<(), EngineError>
pub fn stage_intents( &mut self, intents: Vec<TxnIntent>, ) -> Result<(), EngineError>
pub fn get_node( &self, target: TxnNodeRef, ) -> Result<Option<TxnNodeView>, EngineError>
pub fn get_edge( &self, target: TxnEdgeRef, ) -> Result<Option<TxnEdgeView>, EngineError>
pub fn get_node_by_key( &self, label: &str, key: &str, ) -> Result<Option<TxnNodeView>, EngineError>
pub fn get_edge_by_triple( &self, from: TxnNodeRef, to: TxnNodeRef, label: &str, ) -> Result<Option<TxnEdgeView>, EngineError>
pub fn commit(&mut self) -> Result<TxnCommitResult, EngineError>
pub fn rollback(&mut self) -> Result<(), EngineError>
Auto Trait Implementations§
impl Freeze for WriteTxn
impl RefUnwindSafe for WriteTxn
impl Send for WriteTxn
impl Sync for WriteTxn
impl Unpin for WriteTxn
impl UnsafeUnpin for WriteTxn
impl UnwindSafe for WriteTxn
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more