aboutsummaryrefslogtreecommitdiff
path: root/common/inverse
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/inverse
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/inverse')
-rw-r--r--common/inverse/driver.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/inverse/driver.cxx b/common/inverse/driver.cxx
index c07b751..17fc5d6 100644
--- a/common/inverse/driver.cxx
+++ b/common/inverse/driver.cxx
@@ -172,7 +172,7 @@ main (int argc, char* argv[])
session s;
transaction t (db->begin ());
- result r (db->query<obj2> (query::o1::id == "obj1 1"));
+ result r (db->query<obj2> (query::o1->id == "obj1 1"));
assert (!r.empty ());
assert (r.begin ()->id == o2->id);
assert (r.begin ()->o1->id == o1_1->id);
@@ -190,7 +190,7 @@ main (int argc, char* argv[])
session s;
transaction t (db->begin ());
- result r (db->query<obj3> (query::o1::id == "obj1 1"));
+ result r (db->query<obj3> (query::o1->id == "obj1 1"));
size_t n (0);
for (result::iterator i (r.begin ()); i != r.end (); ++i)