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/search.cxx | |
parent | 63aaad529c9ae9358f22fd9563aeabc679f4defd (diff) |
Share DB object between modules
Diffstat (limited to 'brep/search.cxx')
-rw-r--r-- | brep/search.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/brep/search.cxx b/brep/search.cxx index fc86284..3aa6503 100644 --- a/brep/search.cxx +++ b/brep/search.cxx @@ -12,14 +12,13 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <odb/pgsql/database.hxx> - #include <butl/path> #include <web/module> #include <brep/package> #include <brep/package-odb> +#include <brep/shared-database> using namespace std; using namespace odb::core; @@ -35,11 +34,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 ()); if (options_->results_on_page () > 30) fail << "too many search results on page: " |