mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-20 09:07:14 +02:00
More work on async statements for SQLite.
This commit is contained in:
@ -606,6 +606,15 @@ MySQLConnHnd::MySQLConnHnd(Poco::Data::SessionImpl * session)
|
||||
mPtr = Poco::AnyCast< MYSQL * >(session->getProperty("handle"));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
MySQLConnHnd::MySQLConnHnd(Poco::AutoPtr< Poco::Data::SessionImpl > && session)
|
||||
: MySQLConnHnd()
|
||||
{
|
||||
mSession = std::move(session);
|
||||
// Retrieve the internal handle property
|
||||
mPtr = Poco::AnyCast< MYSQL * >(session->getProperty("handle"));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
MySQLConnHnd::~MySQLConnHnd()
|
||||
{
|
||||
|
@ -268,6 +268,11 @@ public:
|
||||
*/
|
||||
explicit MySQLConnHnd(Poco::Data::SessionImpl * session);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Explicit constructor.
|
||||
*/
|
||||
explicit MySQLConnHnd(Poco::AutoPtr< Poco::Data::SessionImpl > && session);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Destructor.
|
||||
*/
|
||||
|
@ -625,16 +625,16 @@ SQLiteConnHnd::SQLiteConnHnd(Poco::Data::SessionImpl * session)
|
||||
{
|
||||
mSession.assign(session, true);
|
||||
// Retrieve the internal handle property
|
||||
mPtr = Poco::AnyCast< sqlite3 * >(session->getProperty("handle"));
|
||||
mPtr = Poco::AnyCast< sqlite3 * >(mSession->getProperty("handle"));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQLiteConnHnd::SQLiteConnHnd(Poco::AutoPtr< Poco::Data::SessionImpl > && session)
|
||||
: SQLiteConnHnd()
|
||||
{
|
||||
mSession == std::forward< Poco::AutoPtr< Poco::Data::SessionImpl > >(session);
|
||||
mSession = std::move(session);
|
||||
// Retrieve the internal handle property
|
||||
mPtr = Poco::AnyCast< sqlite3 * >(session->getProperty("handle"));
|
||||
mPtr = Poco::AnyCast< sqlite3 * >(mSession->getProperty("handle"));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user