diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-05 14:17:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-05 14:17:07 +0200 |
commit | 55a308d14dc12594c365767d738f71893248f159 (patch) | |
tree | e519c314dc64c87213415d4a7a363ac49ea5d6b9 /common/view/basics/driver.cxx | |
parent | 504fa38f3f71c345f41dfbb7e59b1d2f88308987 (diff) |
Implement result modifiers in view query condition
Diffstat (limited to 'common/view/basics/driver.cxx')
-rw-r--r-- | common/view/basics/driver.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/common/view/basics/driver.cxx b/common/view/basics/driver.cxx index e1a72f7..01ae0ab 100644 --- a/common/view/basics/driver.cxx +++ b/common/view/basics/driver.cxx @@ -653,6 +653,35 @@ main (int argc, char* argv[]) t.commit (); } } + + // view13 + // + { + typedef odb::query<view13> query; + typedef odb::result<view13> result; + + { + transaction t (db->begin ()); + + { + result r (db->query<view13> ( + (query::person::age < 32) + + "ORDER BY" + query::employer::name)); + + assert (size (r) == 2); + } + + t.commit (); + } + } + + // view14 + // + { + transaction t (db->begin ()); + assert (size (db->query<view14> ()) == 2); + t.commit (); + } } catch (const odb::exception& e) { |