aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-09 12:18:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-09 12:18:38 +0200
commit3b728e0a21245871db9f70ba15a00e45f9741698 (patch)
tree957579c81e6816623e8a48a7b3d33a389888d418
parent9c275a93cec797a021571ba8545906e0b4ffbfbc (diff)
New templated query_columns architecture
We also now use the correct separate "role"-base join approach instead of having a single merged join for each table.
-rw-r--r--odb/query.hxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/odb/query.hxx b/odb/query.hxx
index 780ae39..82fb411 100644
--- a/odb/query.hxx
+++ b/odb/query.hxx
@@ -12,6 +12,19 @@
namespace odb
{
+ //
+ //
+ template <typename T>
+ struct query_columns_base;
+
+ template <typename T, const char* table>
+ struct query_columns;
+
+ template <typename T, const char* table>
+ struct pointer_query_columns;
+
+ //
+ //
template <typename T, class_kind kind = class_traits<T>::kind>
struct query_selector;
@@ -20,12 +33,6 @@ namespace odb
{
typedef typename object_traits<T>::query_base_type base_type;
typedef typename object_traits<T>::query_type type;
-
- static const char*
- table_name ()
- {
- return object_traits<T>::table_name;
- }
};
template <typename T>
@@ -33,12 +40,6 @@ namespace odb
{
typedef typename view_traits<T>::query_base_type base_type;
typedef typename view_traits<T>::query_type type;
-
- static const char*
- table_name ()
- {
- return "";
- }
};
template <typename T, typename Q = typename query_selector<T>::base_type>