Used for executing `SELECT COUNT` statements only. Returns `true`, if the count is at least one, `false` otherwise.
(&self, sql: &str, params: impl rusqlite::Params + Send)
| 415 | /// Used for executing `SELECT COUNT` statements only. Returns `true`, if the count is at least |
| 416 | /// one, `false` otherwise. |
| 417 | pub async fn exists(&self, sql: &str, params: impl rusqlite::Params + Send) -> Result<bool> { |
| 418 | let count = self.count(sql, params).await?; |
| 419 | Ok(count > 0) |
| 420 | } |
| 421 | |
| 422 | /// Execute a query which is expected to return one row. |
| 423 | pub async fn query_row<T, F>( |