Re: [Cppcms-users] Continued discussion on bug 3536452 - transaction in progress
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-06-24 06:17:28
|
Here is another idea. 1) Create a cppdb::base_transaction class and implement the current cppdb::transaction in it, but without calling begin() in it's constructor. Make its functions/destructor virtual if users want to overload & support polymorphism. 2) Make cppdb::transaction inherit from base_transaction and call session::begin() in it's constructor, so that current behavior is kept and there wont be any API breakage. 3) Users will then be able to inherit from cppdb::base_transaction and create their own transaction classes. This should avoid adding a default constructor and possibly confuse users. Is this a solid proposal Artyom? |