Overview
Features
Download
Documentation
Community
Add-Ons & Services

Missing function Poco::Data::SessionPool::customizeSession()

Please post support and help requests here.

Missing function Poco::Data::SessionPool::customizeSession()

Postby latitude37s » 11 Feb 2014, 12:56

There was a function called Poco::Data::SessionPool::customizeSession() added way back in release 1.3.4. This has disappeared in release 1.5.0+ without any comments in the revision history or mention in the change log.

It still appears here: https://github.com/pocoproject/poco/blob/poco-1.4.6/Data/src/SessionPool.cpp
But it's missing here: https://github.com/pocoproject/poco/blob/poco-1.5.0/Data/src/SessionPool.cpp

AFAIK, this was the only thing that allowed you to save and reuse prepared statements with the SessionPool container. Is there any alternative mechanism for doing this? Was customizeSession() removed accidentally?
latitude37s
 
Posts: 3
Joined: 07 May 2013, 19:41

Re: Missing function Poco::Data::SessionPool::customizeSessi

Postby latitude37s » 14 Feb 2014, 19:34

Ok, if nobody knows anything about this I'll open a bug report and submit the push request myself. The SessionPool is virtually useless without customizeSession(). You can't achieve good performance without saving and reusing your prepared statements, and I can't see any reasonable way to do that without customizeSession().
latitude37s
 
Posts: 3
Joined: 07 May 2013, 19:41

Re: Missing function Poco::Data::SessionPool::customizeSessi

Postby latitude37s » 24 Feb 2014, 15:39

Revisiting this once more, I suspect that SessionPool::customizeSession() was intended to be replaced with SessionPool::getProperty() and SessionPool::getFeature(). These are more generic, and potentially allow you to implement whatever you had done previously with customizeSession().

Where we have a major API incompatible change such as this, it would be really nice to have something mentioned in the change log though.
latitude37s
 
Posts: 3
Joined: 07 May 2013, 19:41

Re: Missing function Poco::Data::SessionPool::customizeSessi

Postby alex » 25 Feb 2014, 04:11

Actually, there are

Code: Select all
template <typename T>
Session get(const std::string& name, const T& value)
   /// Returns a Session with requested property set.
   /// The property can be different from the default pool
   /// value, in which case it is reset back to the pool
   /// value when the session is reclaimed by the pool.


and

Code: Select all
Session get(const std::string& name, bool value);
   /// Returns a Session with requested feature set.
   /// The feature can be different from the default pool
   /// value, in which case it is reset back to the pool
   /// value when the session is reclaimed by the pool.


See SessionPool
alex
 
Posts: 1103
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests