pub struct Transaction { /* private fields */ }
Expand description
Started transaction (docs).
If tranasction have a timeout and no requests made for that time, tranasction is automatically rolled back.
On drop tranasaction is rolled back, if not have been commited or rolled back already.
Implementations§
Trait Implementations§
Source§impl Debug for Transaction
impl Debug for Transaction
Source§impl Drop for Transaction
impl Drop for Transaction
Source§impl Executor for Transaction
impl Executor for Transaction
Source§fn send_encoded_request<'life0, 'async_trait>(
&'life0 self,
request: EncodedRequest,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_encoded_request<'life0, 'async_trait>(
&'life0 self,
request: EncodedRequest,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send encoded request.
Source§fn transaction_builder(&self) -> TransactionBuilder
fn transaction_builder(&self) -> TransactionBuilder
Prepare
TransactionBuilder
, which can be used to override parameters and create
Transaction
. Read moreSource§fn transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create
Transaction
with parameters from builder. Read morefn get_cached_sql_statement_id<'life0, 'life1, 'async_trait>(
&'life0 self,
statement: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for Transaction
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<E> ExecutorExt for E
impl<E> ExecutorExt for E
Source§fn send_request<R>(
&self,
body: R,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + '_>>where
R: Request,
fn send_request<R>(
&self,
body: R,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + '_>>where
R: Request,
Send request, receiving raw response body. Read more
Source§fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Ping tarantool instance.
Source§fn eval<'life0, 'async_trait, A, I>(
&'life0 self,
expr: I,
args: A,
) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
fn eval<'life0, 'async_trait, A, I>( &'life0 self, expr: I, args: A, ) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
Evaluate Lua expression. Read more
Source§fn call<'life0, 'async_trait, A, I>(
&'life0 self,
function_name: I,
args: A,
) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
fn call<'life0, 'async_trait, A, I>( &'life0 self, function_name: I, args: A, ) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
Remotely call function in Tarantool. Read more
Source§fn select<'life0, 'async_trait, T, A>(
&'life0 self,
space_id: u32,
index_id: u32,
limit: Option<u32>,
offset: Option<u32>,
iterator: Option<IteratorType>,
keys: A,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'async_trait,
A: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn select<'life0, 'async_trait, T, A>(
&'life0 self,
space_id: u32,
index_id: u32,
limit: Option<u32>,
offset: Option<u32>,
iterator: Option<IteratorType>,
keys: A,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'async_trait,
A: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Select tuples from space.
Source§fn insert<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
tuple: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn insert<'life0, 'async_trait, T>( &'life0 self, space_id: u32, tuple: T, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Insert tuple.
Source§fn update<'life0, 'async_trait, K, O>(
&'life0 self,
space_id: u32,
index_id: u32,
keys: K,
ops: O,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn update<'life0, 'async_trait, K, O>( &'life0 self, space_id: u32, index_id: u32, keys: K, ops: O, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Update tuple.
Source§fn upsert<'life0, 'async_trait, T, O>(
&'life0 self,
space_id: u32,
tuple: T,
ops: O,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn upsert<'life0, 'async_trait, T, O>( &'life0 self, space_id: u32, tuple: T, ops: O, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Update or insert tuple.
Source§fn replace<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
tuple: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn replace<'life0, 'async_trait, T>( &'life0 self, space_id: u32, tuple: T, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Insert a tuple into a space. If a tuple with the same primary key already exists,
replaces the existing tuple with a new one.
Source§fn delete<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
index_id: u32,
keys: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn delete<'life0, 'async_trait, T>( &'life0 self, space_id: u32, index_id: u32, keys: T, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Delete a tuple identified by the primary key.
Source§fn execute_sql<'life0, 'async_trait, T, I>(
&'life0 self,
query: I,
binds: T,
) -> Pin<Box<dyn Future<Output = Result<SqlResponse>> + Send + 'async_trait>>
fn execute_sql<'life0, 'async_trait, T, I>( &'life0 self, query: I, binds: T, ) -> Pin<Box<dyn Future<Output = Result<SqlResponse>> + Send + 'async_trait>>
Perform SQL query.
Source§fn prepare_sql<'life0, 'async_trait, I>(
&'life0 self,
query: I,
) -> Pin<Box<dyn Future<Output = Result<PreparedSqlStatement<&Self>>> + Send + 'async_trait>>
fn prepare_sql<'life0, 'async_trait, I>( &'life0 self, query: I, ) -> Pin<Box<dyn Future<Output = Result<PreparedSqlStatement<&Self>>> + Send + 'async_trait>>
Prepare SQL statement.
Source§fn space<'life0, 'async_trait, K>(
&'life0 self,
key: K,
) -> Pin<Box<dyn Future<Output = Result<Option<Space<&Self>>>> + Send + 'async_trait>>
fn space<'life0, 'async_trait, K>( &'life0 self, key: K, ) -> Pin<Box<dyn Future<Output = Result<Option<Space<&Self>>>> + Send + 'async_trait>>
Find and load space by key. Read more