Skip to main content

WriteTxn

Struct WriteTxn 

Source
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

Source

pub fn upsert_node<L>( &mut self, labels: L, key: &str, options: UpsertNodeOptions, ) -> Result<TxnNodeRef, EngineError>
where L: IntoNodeLabels,

Source

pub fn upsert_node_as<L>( &mut self, alias: &str, labels: L, key: &str, options: UpsertNodeOptions, ) -> Result<TxnNodeRef, EngineError>
where L: IntoNodeLabels,

Source

pub fn add_node_label( &mut self, target: TxnNodeRef, label: &str, ) -> Result<bool, EngineError>

Source

pub fn remove_node_label( &mut self, target: TxnNodeRef, label: &str, ) -> Result<bool, EngineError>

Source

pub fn upsert_edge( &mut self, from: TxnNodeRef, to: TxnNodeRef, label: &str, options: UpsertEdgeOptions, ) -> Result<TxnEdgeRef, EngineError>

Source

pub fn upsert_edge_as( &mut self, alias: &str, from: TxnNodeRef, to: TxnNodeRef, label: &str, options: UpsertEdgeOptions, ) -> Result<TxnEdgeRef, EngineError>

Source

pub fn delete_node(&mut self, target: TxnNodeRef) -> Result<(), EngineError>

Source

pub fn delete_edge(&mut self, target: TxnEdgeRef) -> Result<(), EngineError>

Source

pub fn invalidate_edge( &mut self, target: TxnEdgeRef, valid_to: i64, ) -> Result<(), EngineError>

Source

pub fn stage_intents( &mut self, intents: Vec<TxnIntent>, ) -> Result<(), EngineError>

Source

pub fn get_node( &self, target: TxnNodeRef, ) -> Result<Option<TxnNodeView>, EngineError>

Source

pub fn get_edge( &self, target: TxnEdgeRef, ) -> Result<Option<TxnEdgeView>, EngineError>

Source

pub fn get_node_by_key( &self, label: &str, key: &str, ) -> Result<Option<TxnNodeView>, EngineError>

Source

pub fn get_edge_by_triple( &self, from: TxnNodeRef, to: TxnNodeRef, label: &str, ) -> Result<Option<TxnEdgeView>, EngineError>

Source

pub fn commit(&mut self) -> Result<TxnCommitResult, EngineError>

Source

pub fn rollback(&mut self) -> Result<(), EngineError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.