aboutsummaryrefslogtreecommitdiff
path: root/inverse
diff options
context:
space:
mode:
Diffstat (limited to 'inverse')
-rw-r--r--inverse/driver.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/inverse/driver.cxx b/inverse/driver.cxx
index d521579..5a613e1 100644
--- a/inverse/driver.cxx
+++ b/inverse/driver.cxx
@@ -202,7 +202,6 @@ main (int argc, char* argv[])
//
{
typedef odb::query<employee> query;
- typedef odb::result<employee> result;
session s;
transaction t (db->begin ());
@@ -216,10 +215,9 @@ main (int argc, char* argv[])
//
shared_ptr<position> se (new position ("Software Engineer"));
- result r (db->query<employee> (query::first == "John" &&
- query::last == "Doe"));
-
- shared_ptr<employee> john (r.begin ().load ());
+ shared_ptr<employee> john (
+ db->query_one<employee> (query::first == "John" &&
+ query::last == "Doe"));
john->employer (csi);
john->position (se);