From 8295852a42e7dc178ee9cf94df746a85dda48b05 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Mon, 17 Oct 2011 09:13:48 +0200 Subject: Add Oracle create_database code allowing for specification of character sets --- libcommon/common/common.cxx | 10 +++++++++- libcommon/common/common.hxx | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'libcommon/common') diff --git a/libcommon/common/common.cxx b/libcommon/common/common.cxx index d09c14b..c4cc667 100644 --- a/libcommon/common/common.cxx +++ b/libcommon/common/common.cxx @@ -49,8 +49,16 @@ create_database (int& argc, char* argv[], #if defined(DATABASE_SQLITE) bool schema, + unsigned short, + unsigned short, +#elif defined(DATABASE_ORACLE) + bool, + unsigned short charset, + unsigned short ncharset, #else bool, + unsigned short, + unsigned short, #endif size_t max_connections) { @@ -120,7 +128,7 @@ create_database (int& argc, if (max_connections != 0) f.reset (new oracle::connection_pool_factory (max_connections)); - db.reset (new oracle::database (argc, argv, false, 0, f)); + db.reset (new oracle::database (argc, argv, false, charset, ncharset, 0, f)); #endif return db; diff --git a/libcommon/common/common.hxx b/libcommon/common/common.hxx index 6ae33d4..71715d7 100644 --- a/libcommon/common/common.hxx +++ b/libcommon/common/common.hxx @@ -25,6 +25,8 @@ LIBCOMMON_EXPORT std::auto_ptr create_database (int& argc, char* argv[], bool create_schema = true, + unsigned short charset = 0, + unsigned short ncharset = 0, std::size_t max_connections = 0); // This function returns an accurate result only if the result iterator -- cgit v1.1