MySQL++
3.3.0
|
Compile-time substitute for Transaction, which purposely does nothing. Use it to instantiate templates that take Transaction when you don't want transactions to be used. More...
#include <transaction.h>
Public Member Functions | |
NoTransaction (Connection &, bool=false) | |
Constructor. | |
~NoTransaction () | |
Destructor. | |
void | commit () |
stub to replace Transaction::commit() | |
void | rollback () |
stub to replace Transaction::rollback() | |
Compile-time substitute for Transaction, which purposely does nothing. Use it to instantiate templates that take Transaction when you don't want transactions to be used.
This was created for use with InsertPolicy, used by Query::insertfrom(). You might use it when your code already wraps a given sequence of MySQL++ calls in a transaction and does an insertfrom() as part of that. MySQL doesn't support nested transactions, so you need to suppress the one insertfrom() would normally start.