pub trait Query<A> {
// Required methods
fn prepare_mysql<'life0, 'async_trait>(
connection: &'life0 mut MySqlConnection,
) -> Pin<Box<dyn Future<Output = Result<MySqlStatement>> + Send + 'async_trait>>
where 'life0: 'async_trait;
fn query_mysql<'a>(
&'a self,
statement: &'a MySqlStatement,
) -> Query<'a, MySql, MySqlArguments>;
fn row_data_mysql(row: &MySqlRow) -> Result<A>;
// Provided methods
fn prepare<'life0, 'async_trait>(
connection: &'life0 mut AnyConnection<'_>,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
fn query<'a>(&'a self, statement: &'a AnyStatement) -> AnyQuery<'a> { ... }
fn row_data(row: &AnyRow) -> Result<A> { ... }
}Expand description
An interface for queries to allow converting them to various database implementations
Required Methods§
Sourcefn prepare_mysql<'life0, 'async_trait>(
connection: &'life0 mut MySqlConnection,
) -> Pin<Box<dyn Future<Output = Result<MySqlStatement>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn prepare_mysql<'life0, 'async_trait>(
connection: &'life0 mut MySqlConnection,
) -> Pin<Box<dyn Future<Output = Result<MySqlStatement>> + Send + 'async_trait>>where
'life0: 'async_trait,
MySQL version of Query::prepare.
Sourcefn query_mysql<'a>(
&'a self,
statement: &'a MySqlStatement,
) -> Query<'a, MySql, MySqlArguments>
fn query_mysql<'a>( &'a self, statement: &'a MySqlStatement, ) -> Query<'a, MySql, MySqlArguments>
MySQL version of Query::query.
Sourcefn row_data_mysql(row: &MySqlRow) -> Result<A>
fn row_data_mysql(row: &MySqlRow) -> Result<A>
MySQL version of Query::row_data.
Provided Methods§
Sourcefn prepare<'life0, 'async_trait>(
connection: &'life0 mut AnyConnection<'_>,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn prepare<'life0, 'async_trait>(
connection: &'life0 mut AnyConnection<'_>,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Prepare a statement to be later used by Query::query.
Sourcefn query<'a>(&'a self, statement: &'a AnyStatement) -> AnyQuery<'a>
fn query<'a>(&'a self, statement: &'a AnyStatement) -> AnyQuery<'a>
Get a query with all arguments bound already, ready to be fetched.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".