aboutsummaryrefslogtreecommitdiff
path: root/composite/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'composite/driver.cxx')
-rw-r--r--composite/driver.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/composite/driver.cxx b/composite/driver.cxx
index aaedf17..fc228bf 100644
--- a/composite/driver.cxx
+++ b/composite/driver.cxx
@@ -84,16 +84,16 @@ main (int argc, char* argv[])
//
{
typedef odb::query<person> query;
- typedef odb::result<person> result;
transaction t (db->begin ());
- result r (db->query<person> (
- query::name.extras.nickname == "Squeaky"));
+ auto_ptr<person> p (
+ db->query_one<person> (
+ query::name.extras.nickname == "Squeaky"));
- if (!r.empty ())
+ if (p.get () != 0)
{
- name& n (r.begin ()->name ());
+ name& n (p->name ());
cout << n.title () << " " << n.first () << " " << n.last () << endl;
}