[TYPO3-dev] Idea: add transaction support to t3lib_db
Xavier Perseguers
xavier.perseguers at typo3.org
Fri Mar 4 21:06:39 CET 2011
Hi Dmitry,
> I propose to add several new functions to t3lib_db:
>
> public function startTransaction();
> public function commit();
> public function rollback();
> public function hasFailedTransactions();
>
> [...]
>
> I could simply make and RFC but I want this to be discussed first. Also
> I would like to know Xavier's opinion because that affects DBAL. DBAL
> has its own methods like this, which I would copy from the MySQL driver.
> But still I would like to know what people think.
I must admit that I'm a little bit exhausted after this great week in
Berlin (and moreover the last night spent in Q-Dorf) so don't expect
much from me.
Basically I don't see a problem with adding transaction, that's even a
really good idea. I just checked some of the ADOdb drivers we used when
it comes to DBAL. They have basically 3 methods:
BeginTrans()
CommitTrans()
RollbackTrans()
I'd say we could easily use their implementation ("backported" to Core)
as they have a counter too to track the number of open transactions.
If the underlying ADOdb driver does not support transaction, either it
is transparent for DBAL (did not check) or it can very easily be handled.
Cheers
Xavier
--
Xavier Perseguers
Release Manager TYPO3 4.6
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
More information about the TYPO3-dev
mailing list