From 04201d013c2a43d27987122e0118236d74154d77 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 17 Nov 2011 16:49:03 +0200 Subject: Add initial support for SQL Server test infrastructure --- libcommon/common/common.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libcommon/common/common.cxx') diff --git a/libcommon/common/common.cxx b/libcommon/common/common.cxx index 285ef68..28fd24a 100644 --- a/libcommon/common/common.cxx +++ b/libcommon/common/common.cxx @@ -25,6 +25,9 @@ #elif defined(DATABASE_ORACLE) # include # include +#elif defined(DATABASE_MSSQL) +# include +# include #else # error unknown database #endif @@ -42,6 +45,8 @@ namespace sqlite = odb::sqlite; namespace pgsql = odb::pgsql; #elif defined(DATABASE_ORACLE) namespace oracle = odb::oracle; +#elif defined(DATABASE_MSSQL) +namespace mssql = odb::mssql; #endif auto_ptr @@ -124,6 +129,14 @@ create_database (int& argc, // to UTF-8. // db.reset (new oracle::database (argc, argv, false, 873, 873, 0, f)); + +#elif defined(DATABASE_MSSQL) + auto_ptr f; + + if (max_connections != 0) + f.reset (new mssql::connection_pool_factory (max_connections)); + + db.reset (new mssql::database (argc, argv, false, 0, f)); #endif return db; -- cgit v1.1