aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/database.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-08 16:09:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-08 16:09:07 +0200
commitc0af27a770b1505ad6a1226f57f90642ce395296 (patch)
tree21fa70b3fa49c639cef4d5f07b73815291e3be1c /odb/mysql/database.cxx
parent46b2db37445b97cd3dbb8acd4f417e0851a30e4f (diff)
Ground work for multi-database support
All generated code now includes database id. The database-specific database class interface has been updated to include all the database operations. The database-specific tests now use this interface.
Diffstat (limited to 'odb/mysql/database.cxx')
-rw-r--r--odb/mysql/database.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/odb/mysql/database.cxx b/odb/mysql/database.cxx
index e7137bb..b80c95a 100644
--- a/odb/mysql/database.cxx
+++ b/odb/mysql/database.cxx
@@ -34,7 +34,8 @@ namespace odb
const char* charset,
unsigned long client_flags,
transfer_ptr<connection_factory> factory)
- : user_ (user ? user : ""),
+ : odb::database (id_mysql),
+ user_ (user ? user : ""),
passwd_str_ (passwd ? passwd : ""),
passwd_ (passwd ? passwd_str_.c_str () : 0),
db_ (db ? db : ""),
@@ -62,7 +63,8 @@ namespace odb
const string& charset,
unsigned long client_flags,
transfer_ptr<connection_factory> factory)
- : user_ (user),
+ : odb::database (id_mysql),
+ user_ (user),
passwd_str_ (passwd),
passwd_ (passwd_str_.c_str ()),
db_ (db),
@@ -90,7 +92,8 @@ namespace odb
const string& charset,
unsigned long client_flags,
transfer_ptr<connection_factory> factory)
- : user_ (user),
+ : odb::database (id_mysql),
+ user_ (user),
passwd_str_ (passwd ? *passwd : ""),
passwd_ (passwd ? passwd_str_.c_str () : 0),
db_ (db),
@@ -118,7 +121,8 @@ namespace odb
const string& charset,
unsigned long client_flags,
transfer_ptr<connection_factory> factory)
- : user_ (user),
+ : odb::database (id_mysql),
+ user_ (user),
passwd_str_ (passwd),
passwd_ (passwd_str_.c_str ()),
db_ (db),
@@ -146,7 +150,8 @@ namespace odb
const string& charset,
unsigned long client_flags,
transfer_ptr<connection_factory> factory)
- : user_ (user),
+ : odb::database (id_mysql),
+ user_ (user),
passwd_str_ (passwd ? *passwd : ""),
passwd_ (passwd ? passwd_str_.c_str () : 0),
db_ (db),
@@ -171,7 +176,8 @@ namespace odb
const string& charset,
unsigned long client_flags,
transfer_ptr<connection_factory> factory)
- : passwd_ (0),
+ : odb::database (id_mysql),
+ passwd_ (0),
socket_ (0),
charset_ (charset),
client_flags_ (client_flags),