pub struct Transaction<'a> { /* private fields */ }Expand description
A drop-safe explicit transaction: the guard returned by
ArcadeDbClient::transaction. Commands run through the guard; finishing
is explicit (commit/rollback both consume self), and a guard dropped
unfinished rolls back in a background task — the server’s idle-reaper is
the last line of defense.
NOTE (mirrors ArcadeDbClient::begin_transaction): ArcadeDB keeps DDL
outside transaction scope — use the guard for record operations only.
Implementations§
Source§impl Transaction<'_>
impl Transaction<'_>
Sourcepub async fn execute(
&self,
language: &str,
command: &str,
) -> Result<ExecuteCommandResponse>
pub async fn execute( &self, language: &str, command: &str, ) -> Result<ExecuteCommandResponse>
Run a command inside the transaction.
Sourcepub async fn query(&self, query: &str) -> Result<QueryResult>
pub async fn query(&self, query: &str) -> Result<QueryResult>
Run a SQL read inside the transaction.
Trait Implementations§
Source§impl Drop for Transaction<'_>
impl Drop for Transaction<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Transaction<'a>
impl<'a> !UnwindSafe for Transaction<'a>
impl<'a> Freeze for Transaction<'a>
impl<'a> Send for Transaction<'a>
impl<'a> Sync for Transaction<'a>
impl<'a> Unpin for Transaction<'a>
impl<'a> UnsafeUnpin for Transaction<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request