-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
It is useful to have direct access to the underlying connection handle for a Poco::Data::Session object, as this allows us to call the native database API directly - either for performance reasons, or to make use of functionality that is not exposed through Poco::Data.
Enabling this for Poco::Data::MySQL requires a simple one line change to the MySQL SessionImpl constructor in the 1.5.x code:
Index: Data/MySQL/src/SessionImpl.cpp
===================================================================
--- Data/MySQL/src/SessionImpl.cpp (revision 2536)
+++ Data/MySQL/src/SessionImpl.cpp (working copy)
@@ -78,6 +78,7 @@
open();
setConnectionTimeout(CONNECTION_TIMEOUT_DEFAULT);
+ setProperty("handle", static_cast<MYSQL*>(_handle));
}
Reactions are currently unavailable