pub struct LibsqlSession { /* private fields */ }Expand description
One exclusive remote libSQL session.
Dropping a session releases its concurrency permit. A session that was interrupted or whose remote statement failed is poisoned and refuses further calls; acquire a new session instead.
Trait Implementations§
Source§impl Debug for LibsqlSession
impl Debug for LibsqlSession
Source§impl ImmediateTransaction for LibsqlSession
impl ImmediateTransaction for LibsqlSession
Source§fn begin_immediate_async<'a>(
&'a mut self,
) -> DbFuture<'a, Box<dyn Transaction<'a> + 'a>>
fn begin_immediate_async<'a>( &'a mut self, ) -> DbFuture<'a, Box<dyn Transaction<'a> + 'a>>
Begins an immediate transaction on the same session or returns
Unsupported before beginning.Source§impl Session for LibsqlSession
impl Session for LibsqlSession
Source§fn execute_async<'a>(
&'a mut self,
sql: &'a str,
options: QueryOptions,
) -> DbFuture<'a, u64>
fn execute_async<'a>( &'a mut self, sql: &'a str, options: QueryOptions, ) -> DbFuture<'a, u64>
Executes one positional-parameter statement; parameters follow placeholder order, with no SQL rewriting.
Providers must reject an explicit fetch limit before dispatch, e.g. via
QueryOptions::prepare_execute_provider. An inherited limit is permitted.
Providers reject placeholder/parameter count mismatches. SQLite uses ?; PostgreSQL uses $1, $2.Source§fn fetch_async<'a>(
&'a mut self,
sql: &'a str,
options: QueryOptions,
) -> DbFuture<'a, Box<dyn Reader + 'a>>
fn fetch_async<'a>( &'a mut self, sql: &'a str, options: QueryOptions, ) -> DbFuture<'a, Box<dyn Reader + 'a>>
Fetches one bounded batch as a reader. Read more
Source§fn execute_trusted_script_async<'a>(
&'a mut self,
sql: &'a str,
options: QueryOptions,
) -> DbFuture<'a, ()>
fn execute_trusted_script_async<'a>( &'a mut self, sql: &'a str, options: QueryOptions, ) -> DbFuture<'a, ()>
Executes a multi-statement unparameterized script. Input must be trusted; scripts must not manage transactions.
An interrupted operation requires provider cleanup before session reuse.
Source§fn begin_async<'a>(
&'a mut self,
options: TxOptions,
) -> DbFuture<'a, Box<dyn Transaction<'a> + 'a>>
fn begin_async<'a>( &'a mut self, options: TxOptions, ) -> DbFuture<'a, Box<dyn Transaction<'a> + 'a>>
Begins an interactive transaction on this same session; unsupported requested options fail before dispatch.
If dropped after begin dispatch, the provider must roll back or discard the connection before reuse.
Source§fn defaults(&self) -> PoolDefaults
fn defaults(&self) -> PoolDefaults
Defaults inherited by operations on this session.
Source§fn fetch_all_async<'a>(
&'a mut self,
sql: &'a str,
options: QueryOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, DbError>> + Send + 'a>>
fn fetch_all_async<'a>( &'a mut self, sql: &'a str, options: QueryOptions, ) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, DbError>> + Send + 'a>>
Fetches and drains the whole bounded batch. Read more
Source§fn fetch_first_async<'a>(
&'a mut self,
sql: &'a str,
options: QueryOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, DbError>> + Send + 'a>>
fn fetch_first_async<'a>( &'a mut self, sql: &'a str, options: QueryOptions, ) -> Pin<Box<dyn Future<Output = Result<Option<Row>, DbError>> + Send + 'a>>
Fetches at most the first row of the first result set, then drains the full batch. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for LibsqlSession
impl !UnwindSafe for LibsqlSession
impl Forget for LibsqlSession
impl Freeze for LibsqlSession
impl Move for LibsqlSession
impl Send for LibsqlSession
impl Sync for LibsqlSession
impl Unpin for LibsqlSession
impl UnsafeUnpin for LibsqlSession
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