aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-09 14:52:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-09 14:52:34 +0200
commit1b2da148946713f57dfe883c25953c488889e5a9 (patch)
tree31740f00d3118acf981726b97354cd205c8f77cb /odb/mysql
parentedae7d98cfac5f55782236d397c831f68ebe11a6 (diff)
Add support for standard and custom ODB compilation prologues and epilogues
Diffstat (limited to 'odb/mysql')
-rw-r--r--odb/mysql/header.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/odb/mysql/header.cxx b/odb/mysql/header.cxx
index b4781f9..195263c 100644
--- a/odb/mysql/header.cxx
+++ b/odb/mysql/header.cxx
@@ -320,6 +320,7 @@ namespace mysql
<< "{";
// container_type
+ // container_traits
// index_type
// key_type
// value_type
@@ -327,18 +328,20 @@ namespace mysql
os << "typedef " << t.fq_name (m.belongs ().hint ()) <<
" container_type;";
+ os << "typedef odb::access::container_traits< container_type > " <<
+ "container_traits;";
switch (ck)
{
case ck_ordered:
{
- os << "typedef " << container_fq_it (m) << " index_type;";
+ os << "typedef container_traits::index_type index_type;";
break;
}
case ck_map:
case ck_multimap:
{
- os << "typedef " << container_fq_kt (m) << " key_type;";
+ os << "typedef container_traits::key_type key_type;";
}
case ck_set:
case ck_multiset:
@@ -347,12 +350,9 @@ namespace mysql
}
}
- os << "typedef " << container_fq_vt (m) << " value_type;"
+ os << "typedef container_traits::value_type value_type;"
<< endl;
- os << "typedef odb::access::container_traits< container_type > " <<
- "container_traits;";
-
// functions_type
//
switch (ck)
@@ -928,8 +928,10 @@ namespace mysql
<< endl;
if (ctx.options.generate_query ())
- ctx.os << "#include <odb/result.hxx>" << endl
- << endl;
+ ctx.os << "#include <odb/result.hxx>" << endl;
+
+ ctx.os << "#include <odb/container-traits.hxx>" << endl
+ << endl;
ctx.os << "#include <odb/mysql/version.hxx>" << endl
<< "#include <odb/mysql/forward.hxx>" << endl