aboutsummaryrefslogtreecommitdiff
path: root/odb/relational/pgsql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-08 16:09:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-08 16:09:08 +0200
commit4eb0df751704345ec8744fe012e64064d5cdb754 (patch)
tree8043a94c33c5938073acce7137560a765efcaf1f /odb/relational/pgsql
parent2731c14f6b16b8b40eb9b1c9061e6e296f3d49f8 (diff)
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.
Diffstat (limited to 'odb/relational/pgsql')
-rw-r--r--odb/relational/pgsql/common.cxx3
-rw-r--r--odb/relational/pgsql/source.cxx6
2 files changed, 5 insertions, 4 deletions
diff --git a/odb/relational/pgsql/common.cxx b/odb/relational/pgsql/common.cxx
index 3d7e01e..811269e 100644
--- a/odb/relational/pgsql/common.cxx
+++ b/odb/relational/pgsql/common.cxx
@@ -144,7 +144,8 @@ namespace relational
void member_image_type::
traverse_composite (member_info& mi)
{
- type_ = "composite_value_traits< " + mi.fq_type () + " >::image_type";
+ type_ = "composite_value_traits< " + mi.fq_type () +
+ ", id_pgsql >::image_type";
}
void member_image_type::
diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx
index 6a3d761..da07073 100644
--- a/odb/relational/pgsql/source.cxx
+++ b/odb/relational/pgsql/source.cxx
@@ -289,7 +289,7 @@ namespace relational
traverse_composite (member_info& mi)
{
os << "if (composite_value_traits< " << mi.fq_type () <<
- " >::grow (" << endl
+ ", id_pgsql >::grow (" << endl
<< "i." << mi.var << "value, t + " << index_ << "UL))"
<< "{"
<< "grew = true;"
@@ -636,7 +636,7 @@ namespace relational
string const& n (class_fq_name (c));
string const& fn (flat_name (n));
- string traits ("access::object_traits< " + n + " >");
+ string traits ("access::object_traits_impl< " + n + ", id_pgsql >");
os << "const char " << traits << "::" << endl
<< "persist_statement_name[] = " << strlit (fn + "_persist") << ";"
@@ -786,7 +786,7 @@ namespace relational
{
string const& n (class_fq_name (c));
string const& fn (flat_name (n));
- string traits ("access::view_traits< " + n + " >");
+ string traits ("access::view_traits_impl< " + n + ", id_pgsql >");
os << "const char " << traits << "::" << endl
<< "query_statement_name[] = " << strlit (fn + "_query") << ";"