From 5c7104c12f13e9a361a720e054491e1130ef7aa7 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sun, 16 Dec 2018 11:55:04 +0100 Subject: [PATCH] Improve doc --- src/lib.rs | 6 ++++++ src/statement.rs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fa38ce1..cf239c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -392,6 +392,9 @@ impl Connection { /// If the query returns more than one row, all rows except the first are /// ignored. /// + /// Returns `Err(QueryReturnedNoRows)` if no results are returned. If the query truly is optional, + /// you can call `.optional()` on the result of this to get a `Result>`. + /// /// # Failure /// /// Will return `Err` if `sql` cannot be converted to a C-compatible string @@ -412,6 +415,9 @@ impl Connection { /// If the query returns more than one row, all rows except the first are /// ignored. /// + /// Returns `Err(QueryReturnedNoRows)` if no results are returned. If the query truly is optional, + /// you can call `.optional()` on the result of this to get a `Result>`. + /// /// # Failure /// /// Will return `Err` if `sql` cannot be converted to a C-compatible string diff --git a/src/statement.rs b/src/statement.rs index 1bcf4ed..58d290d 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -377,6 +377,9 @@ impl<'conn> Statement<'conn> { /// If the query returns more than one row, all rows except the first are /// ignored. /// + /// Returns `Err(QueryReturnedNoRows)` if no results are returned. If the query truly is optional, + /// you can call `.optional()` on the result of this to get a `Result>`. + /// /// # Failure /// /// Will return `Err` if the underlying SQLite call fails.