pub struct TxnHandle { /* private fields */ }Expand description
Transaction handle for a session.
Implementations§
Source§impl TxnHandle
impl TxnHandle
pub fn new(txn: Box<dyn ErasedAsyncSqlTransaction>) -> Self
pub fn created_at(&self) -> SystemTime
pub fn execute<'a>( &'a self, sql: &'a str, ) -> BoxFuture<'a, Result<ExecutionResult>>
pub fn query<'a>(&'a self, sql: &'a str) -> BoxStream<'a, Result<Row>>
pub async fn commit(self) -> Result<()>
pub async fn rollback(self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TxnHandle
impl !RefUnwindSafe for TxnHandle
impl Send for TxnHandle
impl Sync for TxnHandle
impl Unpin for TxnHandle
impl !UnwindSafe for TxnHandle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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