aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-17 14:16:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-17 14:16:53 +0200
commitb1d1e45ef838dff676ed9a519a9d87aa9aedffc7 (patch)
tree8df771af1be7fa1b11d2b91255ab194fea9ae33f
parent0a2b28b4034a6b44f7bb7a126935d9e58cc0c1f9 (diff)
Handle empty query::in_range() case
-rw-r--r--common/query/basics/driver.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/query/basics/driver.cxx b/common/query/basics/driver.cxx
index a982901..a9a394d 100644
--- a/common/query/basics/driver.cxx
+++ b/common/query/basics/driver.cxx
@@ -408,6 +408,12 @@ main (int argc, char* argv[])
r = db->query<person> (query::first_name.in_range (names, names_end));
print (r);
+ // Empty range.
+ //
+ r = db->query<person> (query::last_name == "Doe" &&
+ query::first_name.in_range (names, names));
+ assert (r.empty ());
+
t.commit ();
}