diff --git a/CHANGELOG.md b/CHANGELOG.md index a978fb1..c5326a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - The `asm` feature has been removed from `sha2` to make it compile on windows. - The shutdown delay of 10 seconds is not being applied anymore if you only run a single instance, which usually is the case during local development. This greatly improves the DX. +- `hiqlite::Client::query_raw_not_empty()` has been removed as it was redundant. `query_raw_one()` behaves in the + same way. ## v0.4.0 diff --git a/hiqlite/src/client/query.rs b/hiqlite/src/client/query.rs index 85ce7be..c90cdbb 100644 --- a/hiqlite/src/client/query.rs +++ b/hiqlite/src/client/query.rs @@ -242,27 +242,6 @@ impl Client { } } - /// A raw query will return the bare `Row` without doing any deserialization or mapping. - /// - /// This version works the same as `query_raw()` with the exception that it will return an - /// error, if no rows have been returned. This eliminates the need for manual `is_empty()` checks - /// each time. - pub async fn query_raw_not_empty( - &self, - stmt: S, - params: Params, - ) -> Result, Error> - where - S: Into>, - { - let rows = self.query_raw(stmt, params).await?; - if rows.is_empty() { - Err(Error::Sqlite("No rows returned".into())) - } else { - Ok(rows) - } - } - /// A raw query will return the bare `Row` without doing any deserialization or mapping. /// /// This version will return exactly one `Row`.