[TYPO3-dev] Idea: add transaction support to t3lib_db
Jigal van Hemert
jigal at xs4all.nl
Mon Mar 7 11:14:28 CET 2011
On 7-3-2011 10:13, Dmitry Dulepov wrote:
> Hi!
>
> Jigal van Hemert wrote:
>> For both issues: see the message you replied to!
>
> No answer there.
Okay, let me quote a bit:
Regarding: To get engine you need to run an extra SQL query.
>>> DB class could contain knowledge about which engine / DBMS supports
>>> it.
>> - checking table type would be too expensive
> Then we should keep track of this information.
TYPO3 only modifies database structures in a few situations: extension
manager and install tool. These functions (expanded by DBAL) could store
info about engine / DBMS somewhere in the system.
Regarding: Even if you get the info that transaction is not supported,
what would you do with it? Raise an exception and break the extension? :)
>> Also if the transaction is not possible, what would you do? I expect,
>> you would proceed anyway :)
>
> Maybe I would proceed in a different way. You don't want to use
> transactions for nothing. If you want to perform an operation which
> requires that the table doesn't change between two queries you might
> want to decide to lock the table (a transaction doesn't block other
> operations). You way need to take expensive measure to make sure the
> operation goes right. Certainly you will have to take into account
> that a rollback is impossible.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-dev
mailing list