aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/database.hxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-09-29 09:04:58 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-09-29 09:04:58 +0200
commit941ea94e219b6642207d4d477ca8156572bfc061 (patch)
tree70c9c7e2dda3ff4deb3781832e20a9f79da67552 /odb/oracle/database.hxx
parent63884d028d25114263f53fbc8c2025003b8900c9 (diff)
Add character set and national character set arguments to database constructor
Diffstat (limited to 'odb/oracle/database.hxx')
-rw-r--r--odb/oracle/database.hxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/odb/oracle/database.hxx b/odb/oracle/database.hxx
index a9be13d..80b6fba 100644
--- a/odb/oracle/database.hxx
+++ b/odb/oracle/database.hxx
@@ -21,6 +21,7 @@
#include <odb/oracle/connection.hxx>
#include <odb/oracle/connection-factory.hxx>
#include <odb/oracle/auto-handle.hxx>
+#include <odb/oracle/oracle-fwd.hxx>
#include <odb/oracle/details/export.hxx>
@@ -36,6 +37,8 @@ namespace odb
database (const std::string& user,
const std::string& password,
const std::string& db,
+ ub2 charset = 0,
+ ub2 ncharset = 0,
OCIEnv* environment = 0,
std::auto_ptr<connection_factory> factory =
std::auto_ptr<connection_factory> (0));
@@ -45,6 +48,8 @@ namespace odb
const std::string& service,
const std::string& host = "",
unsigned int port = 0,
+ ub2 charset = 0,
+ ub2 ncharset = 0,
OCIEnv* environment = 0,
std::auto_ptr<connection_factory> factory =
std::auto_ptr<connection_factory> (0));
@@ -68,6 +73,8 @@ namespace odb
database (int& argc,
char* argv[],
bool erase = false,
+ ub2 charset = 0,
+ ub2 ncharset = 0,
OCIEnv* environment = 0,
std::auto_ptr<connection_factory> =
std::auto_ptr<connection_factory> (0));
@@ -120,6 +127,18 @@ namespace odb
return port_;
}
+ ub2
+ charset () const
+ {
+ return charset_;
+ }
+
+ ub2
+ ncharset () const
+ {
+ return ncharset_;
+ }
+
OCIEnv*
environment ()
{
@@ -144,6 +163,9 @@ namespace odb
std::string host_;
unsigned int port_;
+ ub2 charset_;
+ ub2 ncharset_;
+
auto_handle<OCIEnv> auto_environment_;
OCIEnv* environment_;