pub trait Query<A> {
// Required methods
fn prepare_mysql<'life0, 'async_trait>(
connection: &'life0 mut AnyConnection,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait;
fn query_mysql<'a>(
&'a self,
statement: &'a AnyStatement<'static>,
) -> Query<'a, Any, AnyArguments<'a>>;
fn row_data(row: &AnyRow) -> Result<A>;
// Provided methods
fn prepare<'life0, 'async_trait>(
connection: &'life0 mut AnyConnection,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement<'static>>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
fn query<'a>(
&'a self,
connection: &AnyConnection,
statement: &'a AnyStatement<'static>,
) -> Query<'a, Any, AnyArguments<'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 AnyConnection,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn prepare_mysql<'life0, 'async_trait>(
connection: &'life0 mut AnyConnection,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
MySQL version of Query::prepare.
sourcefn query_mysql<'a>(
&'a self,
statement: &'a AnyStatement<'static>,
) -> Query<'a, Any, AnyArguments<'a>>
fn query_mysql<'a>( &'a self, statement: &'a AnyStatement<'static>, ) -> Query<'a, Any, AnyArguments<'a>>
MySQL version of Query::query.
Provided Methods§
sourcefn prepare<'life0, 'async_trait>(
connection: &'life0 mut AnyConnection,
) -> Pin<Box<dyn Future<Output = Result<AnyStatement<'static>>> + 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<'static>>> + 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,
connection: &AnyConnection,
statement: &'a AnyStatement<'static>,
) -> Query<'a, Any, AnyArguments<'a>>
fn query<'a>( &'a self, connection: &AnyConnection, statement: &'a AnyStatement<'static>, ) -> Query<'a, Any, AnyArguments<'a>>
Get a query with all arguments bound already, ready to be fetched.
Object Safety§
This trait is not object safe.