Struct sqlx::query::Map [−][src]
pub struct Map<'q, DB, F, A> where
DB: Database, { /* fields omitted */ }
Expand description
SQL query that will map its results to owned Rust types.
Returned by Query::try_map
, query!()
, etc. Has most of the same methods as Query
but
the return types are changed to reflect the mapping. However, there is no equivalent of
Query::execute
as it doesn’t make sense to map the result type and then ignore it.
Query::bind
is also omitted; stylistically we recommend placing your .bind()
calls
before .try_map()
. This is also to prevent adding superfluous binds to the result of
query!()
et al.
Implementations
Execute the query and return the generated results as a stream.
Execute multiple queries and return the generated results as a stream from each query, in a stream.
Execute the query and return all the generated results, collected into a Vec
.
Execute the query and returns exactly one row.
Trait Implementations
Gets the previously cached statement, if available.
Returns the arguments to be bound against the query string. Read more
Returns true
if the statement should be cached.