diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-08-14 15:14:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-08-14 15:21:07 +0200 |
commit | e923e350cd29afa4765cf4fadfb2f63553943aa6 (patch) | |
tree | 1a62957b28d5cd6916afd210e88c4eed45c42502 /common/view/driver.cxx | |
parent | 0947d7889b104722134b55971f7fd04320731ce1 (diff) |
Get rid of warning
Diffstat (limited to 'common/view/driver.cxx')
-rw-r--r-- | common/view/driver.cxx | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/common/view/driver.cxx b/common/view/driver.cxx index 2c5c65c..7ef8272 100644 --- a/common/view/driver.cxx +++ b/common/view/driver.cxx @@ -278,41 +278,40 @@ main (int argc, char* argv[]) // view1b // { - typedef odb::query<view1b> query; typedef odb::result<view1b> result; { - { - transaction t (db->begin ()); + transaction t (db->begin ()); - result r (db->query<view1b> ()); - view1_check (r); + result r (db->query<view1b> ()); + view1_check (r); - t.commit (); - } + t.commit (); + } - // No native parameter support in dynamic multi-database mode. - // + // No native parameter support in dynamic multi-database mode. + // #ifndef DATABASE_COMMON - { - transaction t (db->begin ()); + { + typedef odb::query<view1b> query; + + transaction t (db->begin ()); #ifndef DATABASE_ORACLE - result r (db->query<view1b> ("first = " + query::_val ("Jane"))); + result r (db->query<view1b> ("first = " + query::_val ("Jane"))); #else - result r (db->query<view1b> ("\"first\" = " + query::_val ("Jane"))); + result r (db->query<view1b> ("\"first\" = " + query::_val ("Jane"))); #endif - result::iterator i (r.begin ()); + result::iterator i (r.begin ()); - assert (i != r.end ()); - assert (i->first == "Jane" && i->last == "Doe"); - assert (++i == r.end ()); + assert (i != r.end ()); + assert (i->first == "Jane" && i->last == "Doe"); + assert (++i == r.end ()); - t.commit (); - } -#endif + t.commit (); } +#endif } // view1c |