Runs a query and returns the number of affected rows.
(
client: &C,
query: Sql,
params: &[&(dyn ToSql + Sync)],
)
| 97 | |
| 98 | /// Runs a query and returns the number of affected rows. |
| 99 | pub async fn execute<C: GenericClient + Sync>( |
| 100 | client: &C, |
| 101 | query: Sql, |
| 102 | params: &[&(dyn ToSql + Sync)], |
| 103 | ) -> Result<u64, PostgresError> { |
| 104 | Ok(client.execute(query.as_str(), params).await?) |
| 105 | } |
| 106 | |
| 107 | /// Runs a prepared query and returns the number of affected rows. |
| 108 | pub async fn execute_prepared<C: GenericClient + Sync>( |
no test coverage detected