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.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Executor<'a>
impl<'a> !UnwindSafe for Executor<'a>
impl<'a> Freeze for Executor<'a>
impl<'a> Send for Executor<'a>
impl<'a> Sync for Executor<'a>
impl<'a> Unpin for Executor<'a>
impl<'a> UnsafeUnpin for Executor<'a>
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