pub trait ConnExt: Sync {
// Required methods
fn query_raw(
&self,
sql: &str,
params: impl IntoParams + Send,
) -> impl Future<Output = Result<Rows, Error>> + Send;
fn execute_raw(
&self,
sql: &str,
params: impl IntoParams + Send,
) -> impl Future<Output = Result<u64, Error>> + Send;
// Provided method
fn select<'a>(&'a self, sql: &str) -> SelectBuilder<'a, Self>
where Self: Sized { ... }
}Expand description
Low-level query trait implemented for libsql::Connection and libsql::Transaction.
Provides query_raw, execute_raw, and the select builder
entry point. Higher-level helpers are on ConnQueryExt, which is blanket-implemented
for all ConnExt types.
Required Methods§
Sourcefn query_raw(
&self,
sql: &str,
params: impl IntoParams + Send,
) -> impl Future<Output = Result<Rows, Error>> + Send
fn query_raw( &self, sql: &str, params: impl IntoParams + Send, ) -> impl Future<Output = Result<Rows, Error>> + Send
Execute a query and return raw rows.
Sourcefn execute_raw(
&self,
sql: &str,
params: impl IntoParams + Send,
) -> impl Future<Output = Result<u64, Error>> + Send
fn execute_raw( &self, sql: &str, params: impl IntoParams + Send, ) -> impl Future<Output = Result<u64, Error>> + Send
Execute a statement and return the number of affected rows.
Provided Methods§
Sourcefn select<'a>(&'a self, sql: &str) -> SelectBuilder<'a, Self>where
Self: Sized,
fn select<'a>(&'a self, sql: &str) -> SelectBuilder<'a, Self>where
Self: Sized,
Start a composable SelectBuilder from a base SQL query.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.