Runs a prepared query and returns all resulting rows.
(
client: &C,
statement: &Statement,
params: &[&(dyn ToSql + Sync)],
)
| 52 | |
| 53 | /// Runs a prepared query and returns all resulting rows. |
| 54 | pub async fn query_prepared<C: GenericClient + Sync>( |
| 55 | client: &C, |
| 56 | statement: &Statement, |
| 57 | params: &[&(dyn ToSql + Sync)], |
| 58 | ) -> Result<Vec<Row>, PostgresError> { |
| 59 | Ok(client.query(statement, params).await?) |
| 60 | } |
| 61 | |
| 62 | /// Runs a query and returns exactly one row. |
| 63 | pub async fn query_one<C: GenericClient + Sync>( |