aboutsummaryrefslogtreecommitdiff
path: root/odb/query.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-23 16:48:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-23 16:48:00 +0200
commit1896d36996ab48ed7271e855d7e32b4e61f64896 (patch)
tree6d085eb0349d23bc26fe101b2451235939f17d40 /odb/query.hxx
parentc2be6303f97e470960ee77805128c46d3ea5c102 (diff)
Polymorphic inheritance support
Diffstat (limited to 'odb/query.hxx')
-rw-r--r--odb/query.hxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/odb/query.hxx b/odb/query.hxx
index 0c748d6..e654ade 100644
--- a/odb/query.hxx
+++ b/odb/query.hxx
@@ -11,15 +11,26 @@
namespace odb
{
+ // Table alias for type T and alias tag Tag. The dummy third template
+ // argument is used to make the C++ compiler weed out duplicates.
//
+ // The alias_traits interface consists of two things: the table_name
+ // static variable containing the name and, in case of a derived type
+ // in a polymorphic hierarchy, the base_traits typedef. Note that the
+ // same interface is exposed by object_traits, which is used when
+ // we need straight tables instead of aliases.
//
+ //
+ template <typename T, typename Tag, bool dummy = true>
+ struct alias_traits;
+
template <typename T>
struct query_columns_base;
- template <typename T, const char* table>
+ template <typename T, typename Alias>
struct query_columns;
- template <typename T, const char* table>
+ template <typename T, typename Alias>
struct pointer_query_columns;
// Object pointer syntax wrapper.