pub trait SqlReader: Send + 'static {
// Required methods
fn query_row<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SqlRow>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn query_all<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SqlRow>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn query_scalar<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn explain<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SqlRow>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Read-capable SQL connection.
Required Methods§
Sourcefn query_row<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SqlRow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_row<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SqlRow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute statement and return the first row, or None if the result set is empty.
Sourcefn query_all<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SqlRow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_all<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SqlRow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute statement and return all rows.
Sourcefn query_scalar<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SqlValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_scalar<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SqlValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute statement and return the first column of the first row as a scalar.
Sourcefn explain<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SqlRow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn explain<'life0, 'async_trait>(
&'life0 mut self,
statement: SqlStatement,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SqlRow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run EXPLAIN QUERY PLAN for statement and return the plan rows.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".