From 0b6b57f9acaa2ec648bf582ff67851331f8e6eef Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 14 Mar 2016 14:38:45 +0300 Subject: Use serializable transaction isolation level --- brep/mod-package-search.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'brep/mod-package-search.cxx') diff --git a/brep/mod-package-search.cxx b/brep/mod-package-search.cxx index 77a06b6..9769783 100644 --- a/brep/mod-package-search.cxx +++ b/brep/mod-package-search.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include using namespace odb::core; @@ -33,9 +32,8 @@ using namespace brep::cli; // brep::package_search:: package_search (const package_search& r) - : module (r), - options_ (r.initialized_ ? r.options_ : nullptr), - db_ (r.initialized_ ? r.db_ : nullptr) + : database_module (r), + options_ (r.initialized_ ? r.options_ : nullptr) { } @@ -47,11 +45,11 @@ init (scanner& s) options_ = make_shared ( s, unknown_mode::fail, unknown_mode::fail); + database_module::init (*options_); + if (options_->root ().empty ()) options_->root (dir_path ("/")); - db_ = shared_database (*options_); - // Check that the database schema matches the current one. It's enough to // perform the check in just a single module implementation (and we don't // do in the dispatcher because it doesn't use the database). @@ -94,7 +92,8 @@ handle (request& rq, response& rs) try { name_value_scanner s (rq.parameters ()); - params = params::package_search (s, unknown_mode::fail, unknown_mode::fail); + params = params::package_search ( + s, unknown_mode::fail, unknown_mode::fail); } catch (const unknown_argument& e) { @@ -107,6 +106,7 @@ handle (request& rq, response& rs) ? "" : "?q=" + web::mime_url_encode (squery)); + static const string title ("Packages"); xml::serializer s (rs.content (), title); -- cgit v1.1