From 4eb0df751704345ec8744fe012e64064d5cdb754 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 8 Oct 2012 16:09:08 +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/relational/pgsql/common.cxx | 3 ++- odb/relational/pgsql/source.cxx | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'odb/relational/pgsql') 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") << ";" -- cgit v1.1