From 6cd8b9f561b912f264ba4f723845935c40a3cb95 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Jun 2013 10:39:59 +0200 Subject: Add support for running tests in dynamic multi-database mode Only possible in the development build system at this stage. --- libcommon/common/common.hxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libcommon/common/common.hxx') diff --git a/libcommon/common/common.hxx b/libcommon/common/common.hxx index 114dbdd..f9bbd4d 100644 --- a/libcommon/common/common.hxx +++ b/libcommon/common/common.hxx @@ -20,20 +20,25 @@ #endif LIBCOMMON_EXPORT std::auto_ptr -create_database (int& argc, +create_database (int argc, char* argv[], bool create_schema = true, - std::size_t max_connections = 0); + std::size_t max_connections = 0, + odb::database_id db = odb::id_common); template std::auto_ptr -create_specific_database (int& argc, +create_specific_database (int argc, char* argv[], bool create_schema = true, std::size_t max_connections = 0) { std::auto_ptr r ( - create_database (argc, argv, create_schema, max_connections)); + create_database (argc, argv, + create_schema, + max_connections, + T::database_id)); + return std::auto_ptr (&dynamic_cast (*r.release ())); } -- cgit v1.1