mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
[SF 2505290] DB connection as URI (MySQL not tested!)
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "Poco/Data/Session.h"
|
||||
#include "Poco/Data/SessionFactory.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/URI.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
@@ -58,8 +60,14 @@ Session::Session(const std::string& connector, const std::string& connectionStri
|
||||
}
|
||||
|
||||
|
||||
Session::Session(const Session& other):
|
||||
_ptrImpl(other._ptrImpl),
|
||||
Session::Session(const std::string& connection)
|
||||
{
|
||||
Session newSession(SessionFactory::instance().create(connection));
|
||||
swap(newSession);
|
||||
}
|
||||
|
||||
|
||||
Session::Session(const Session& other): _ptrImpl(other._ptrImpl),
|
||||
_statementCreator(other._ptrImpl)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user