diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-11 15:34:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-23 13:50:07 +0200 |
commit | a7e766e1aa77fff846d8426658befd9a01fe2861 (patch) | |
tree | 734e658aca46fa945994db85ea586d79c8933bcd /brep/view.cxx | |
parent | 63aaad529c9ae9358f22fd9563aeabc679f4defd (diff) |
Share DB object between modules
Diffstat (limited to 'brep/view.cxx')
-rw-r--r-- | brep/view.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/brep/view.cxx b/brep/view.cxx index 08e2592..2f3bd17 100644 --- a/brep/view.cxx +++ b/brep/view.cxx @@ -11,12 +11,11 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <odb/pgsql/database.hxx> - #include <web/module> #include <brep/package> #include <brep/package-odb> +#include <brep/shared-database> using namespace std; using namespace odb::core; @@ -31,11 +30,7 @@ namespace brep cli::unknown_mode::fail, cli::unknown_mode::fail); - db_ = make_shared<odb::pgsql::database> ("", - "", - "brep", - options_->db_host (), - options_->db_port ()); + db_ = shared_database (options_->db_host (), options_->db_port ()); } void view:: |