pub struct Executor<'a> { /* private fields */ }Implementations§
Source§impl<'a> Executor<'a>
impl<'a> Executor<'a>
pub fn new(store: &'a GraphStore) -> Self
Sourcepub fn execute(&self, stmt: &Statement) -> Result<QueryResult, QueryError>
pub fn execute(&self, stmt: &Statement) -> Result<QueryResult, QueryError>
Dispatches on whether stmt ever mutates anything. A read-only
statement (MATCH ... RETURN, is_read_only below) runs inside a
ReadTransaction — a consistent snapshot that doesn’t contend for
redb’s single-writer lock, so concurrent readers run in parallel
instead of queueing behind each other. Everything else runs inside
a WriteTransaction, committed or aborted as a whole — the
crash-safety boundary from the plan (one statement = one commit).
Every graph access below this point must go through the *_in_txn
GraphStore methods, never the standalone self.store.* methods,
which open (and would deadlock trying to re-open) their own
transaction.
pub fn execute_with_options( &self, stmt: &Statement, options: &ExecutionOptions, ) -> Result<QueryResult, QueryError>
Sourcepub fn execute_in_write_transaction(
&self,
stmt: &Statement,
write_txn: &WriteTransaction,
) -> Result<QueryResult, QueryError>
pub fn execute_in_write_transaction( &self, stmt: &Statement, write_txn: &WriteTransaction, ) -> Result<QueryResult, QueryError>
Execute without committing against a caller-owned write transaction.
The caller must commit or abort the transaction. This is the low-level
primitive used by marsdb::Transaction for atomic multi-statement
units of work.
pub fn execute_in_write_transaction_with_options( &self, stmt: &Statement, write_txn: &WriteTransaction, options: &ExecutionOptions, ) -> Result<QueryResult, QueryError>
Auto Trait Implementations§
impl<'a> !Freeze for Executor<'a>
impl<'a> !RefUnwindSafe for Executor<'a>
impl<'a> !Sync for Executor<'a>
impl<'a> !UnwindSafe for Executor<'a>
impl<'a> Send for Executor<'a>
impl<'a> Unpin for Executor<'a>
impl<'a> UnsafeUnpin for Executor<'a>
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer