From a06b917d661a61aad88dbf4351494b7c84273dc6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 2 Oct 2011 17:07:21 +0200 Subject: If query substituting placeholder is empty, pass true expression instead This allows uniform usage of views both with and without any extra conditions. Also optimize some common cases so that we don't have useless WHERE TRUE clauses or (...) AND (TRUE) expressions. --- common/view/driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/view/driver.cxx') diff --git a/common/view/driver.cxx b/common/view/driver.cxx index cd734bd..a3ef34f 100644 --- a/common/view/driver.cxx +++ b/common/view/driver.cxx @@ -268,7 +268,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - result r (db->query (query (true))); + result r (db->query ()); view1_check (r); t.commit (); -- cgit v1.1