diff options
Diffstat (limited to 'odb/mssql/database.ixx')
-rw-r--r-- | odb/mssql/database.ixx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/odb/mssql/database.ixx b/odb/mssql/database.ixx index 6558339..e90da54 100644 --- a/odb/mssql/database.ixx +++ b/odb/mssql/database.ixx @@ -2,12 +2,38 @@ // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC // license : ODB NCUEL; see accompanying LICENSE file +#include <utility> // move() + #include <odb/mssql/transaction.hxx> namespace odb { namespace mssql { +#ifdef ODB_CXX11 + inline database:: + database (database&& db) // Has to be inline. + : odb::database (std::move (db)), + user_ (std::move (db.user_)), + password_ (std::move (db.password_)), + db_ (std::move (db.db_)), + protocol_ (db.protocol_), + host_ (std::move (db.host_)), + instance_ (std::move (db.instance_)), + port_ (db.port_), + server_ (std::move (db.server_)), + driver_ (std::move (db.driver_)), + extra_connect_string_ (std::move (db.extra_connect_string_)), + transaction_isolation_ (db.transaction_isolation_), + connect_string_ (std::move (db.connect_string_)), + auto_environment_ (std::move (db.auto_environment_)), + environment_ (db.environment_), + factory_ (std::move (db.factory_)) + { + factory_->database (*this); // New database instance. + } +#endif + inline connection_ptr database:: connection () { |