aboutsummaryrefslogtreecommitdiff
path: root/common/composite
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-20 11:53:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-20 11:53:04 +0200
commit18a040773c389de7be48111efc0f3cf7252ffc68 (patch)
treee68e5edde6a7f321e03172ecd5684d26644978c9 /common/composite
parentf70b64e2c4f9861d7013492b609212ed78e840f5 (diff)
Change query syntax to use . for composite and -> for object pointer access
Also make non-inverse query columns act as both an object pointer and a normal column. The latter allows us to use natural expressions such as query<employee>::employer.is_null ().
Diffstat (limited to 'common/composite')
-rw-r--r--common/composite/driver.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/composite/driver.cxx b/common/composite/driver.cxx
index e1dfef8..606f367 100644
--- a/common/composite/driver.cxx
+++ b/common/composite/driver.cxx
@@ -90,7 +90,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- result r (db->query<person> (query::name::first == "Joe"));
+ result r (db->query<person> (query::name.first == "Joe"));
assert (!r.empty ());
assert (*r.begin () == p);
@@ -104,7 +104,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- result r (db->query<person> (query::name::flags::alias));
+ result r (db->query<person> (query::name.flags.alias));
assert (!r.empty ());
assert (*r.begin () == p);