Struct libsql::transaction::Transaction
source · pub struct Transaction { /* private fields */ }Implementations§
Methods from Deref<Target = Connection>§
pub async fn execute(&self, sql: &str, params: impl Into<Params>) -> Result<u64>
pub async fn execute_batch(&self, sql: &str) -> Result<()>
pub async fn prepare(&self, sql: &str) -> Result<Statement>
pub async fn query(&self, sql: &str, params: impl Into<Params>) -> Result<Rows>
sourcepub async fn transaction(&self) -> Result<Transaction>
pub async fn transaction(&self) -> Result<Transaction>
Begin a new transaction in DEFERRED mode, which is the default.
sourcepub async fn transaction_with_behavior(
&self,
tx_behavior: TransactionBehavior
) -> Result<Transaction>
pub async fn transaction_with_behavior( &self, tx_behavior: TransactionBehavior ) -> Result<Transaction>
Begin a new transaction in the given mode.
pub fn is_autocommit(&self) -> bool
pub fn changes(&self) -> u64
pub fn last_insert_rowid(&self) -> i64
pub fn close(&self)
Trait Implementations§
source§impl Deref for Transaction
impl Deref for Transaction
§type Target = Connection
type Target = Connection
The resulting type after dereferencing.
source§fn deref(&self) -> &Connection
fn deref(&self) -> &Connection
Dereferences the value.
Auto Trait Implementations§
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
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