aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/query/driver.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/common/query/driver.cxx b/common/query/driver.cxx
index 9c2f9ce..cb19859 100644
--- a/common/query/driver.cxx
+++ b/common/query/driver.cxx
@@ -111,7 +111,19 @@ main (int argc, char* argv[])
{
transaction t (db->begin_transaction ());
result r (db->query<person> ("ORDER BY age"));
- print (r);
+
+ for (result::iterator i (r.begin ()); i != r.end (); ++i)
+ {
+ cout << i->first_name_;
+
+ if (i->middle_name_.get () != 0)
+ cout << ' ' << *i->middle_name_;
+
+ cout << ' ' << i->last_name_ << ' ' << i->age_ <<
+ (i->married_ ? " married" : " single") << endl;
+ }
+ cout << endl;
+
t.commit ();
}