From be97326d67365e16175cc599e23348feaf80e0fe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 8 Oct 2012 16:09:07 +0200 Subject: Ground work for multi-database support All generated code now includes database id. The database-specific database class interface has been updated to include all the database operations. The database-specific tests now use this interface. --- odb/query.hxx | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'odb/query.hxx') diff --git a/odb/query.hxx b/odb/query.hxx index 9f889db..d5d0a19 100644 --- a/odb/query.hxx +++ b/odb/query.hxx @@ -7,6 +7,7 @@ #include +#include #include namespace odb @@ -21,16 +22,16 @@ namespace odb // we need straight tables instead of aliases. // // - template + template struct alias_traits; - template + template struct query_columns_base; - template + template struct query_columns; - template + template struct pointer_query_columns; // Object pointer syntax wrapper. @@ -56,29 +57,33 @@ namespace odb // we have to use the impl trick below instead of simply having kind // as a second template argument with a default value. // - template + template struct query_selector_impl; - template - struct query_selector_impl + template + struct query_selector_impl { - typedef typename object_traits::query_base_type base_type; - typedef query_columns > columns_type; + typedef typename object_traits_impl::query_base_type base_type; + + typedef + query_columns > + columns_type; }; - template - struct query_selector_impl + template + struct query_selector_impl { - typedef typename view_traits::query_base_type base_type; - typedef typename view_traits::query_columns columns_type; + typedef typename view_traits_impl::query_base_type base_type; + typedef typename view_traits_impl::query_columns columns_type; }; - template - struct query_selector: query_selector_impl::kind> + template + struct query_selector: query_selector_impl::kind> { }; - template ::base_type> + template ::base_type> class query; namespace core -- cgit v1.1