From 18add9bb3064d8a994cc1b0c3a50c5df2dff3bf9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 29 Nov 2012 11:32:44 +0200 Subject: Namespace management for static multi-database support Now in libodb the odb::core namespace is split into odb::common (database- independent stuff) and odb::core proper, which imports odb::common. Each database runtime now defines odb::::core namespace which also imports odb::common and adds the database-specific bits. The overall idea is that one can do using namespace odb::::core just like for odb::core. --- odb/pgsql/forward.hxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'odb/pgsql/forward.hxx') diff --git a/odb/pgsql/forward.hxx b/odb/pgsql/forward.hxx index e164bf1..d028f4d 100644 --- a/odb/pgsql/forward.hxx +++ b/odb/pgsql/forward.hxx @@ -13,6 +13,13 @@ namespace odb { namespace pgsql { + namespace core + { + using namespace odb::common; + } + + // + // class database; class connection; typedef details::shared_ptr connection_ptr; @@ -21,6 +28,15 @@ namespace odb class transaction; class tracer; + namespace core + { + using pgsql::database; + using pgsql::connection; + using pgsql::connection_ptr; + using pgsql::transaction; + using pgsql::statement; + } + // Implementation details. // enum statement_kind -- cgit v1.1