pub struct Connection { /* private fields */ }
Expand description
Connection to Tarantool instance.
This type doesn’t represent single TCP connection, but rather an abstraction for interaction with Tarantool instance.
Underling implemenation could reconnect automatically (depending on builder configuration), and could do pooling in the future (not yet implemented!).
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn builder() -> ConnectionBuilder
pub fn builder() -> ConnectionBuilder
Create new ConnectionBuilder
.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Connection
impl Debug for Connection
Source§impl Executor for Connection
impl Executor for Connection
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 Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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<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