[TYPO3-core] RFC: Bug #13508: Use exec_TRUNCATETABLEquery() instead of DELETE FROM throughout the core

Martin Kutschker masi-no at spam-typo3.org
Fri Feb 12 11:12:38 CET 2010


Dmitry Dulepov schrieb:
> Hi!
> 
> On 2010-02-11 15:09:34 +0200, Ries van Twisk said:
>> TRUNCATE is well know enough among all developers to understand it and
>> when to use it.
> 
> I do not think so. Do you have some facts to prove this statement?

TRUNCATE is used by phpMyAdmin so it is well known. I guess that not all developers know the
difference between DELETE and TRUNCATE. But they are probably the same that have no idea what
triggers are, what a foreign key is and what transactions are for. ;)

That's why there has been the suggestion to add a note about triggers (and - afterthought - about
foreign keys) to the inline docs for the TRUNCATE method.

> Btw, another coredev can give +1 to this patch and compensate my -1. But
> I will be really disappointed by that because it will mean that TYPO3
> still heads to introducing complexity instead of hiding it.

Hiding complexity shouldn't be geared at dumbing down the API. If there weren't differences other
than speed I would be with you. But alas, TRUNCATE has to be used with care, so hiding it behind the
DELETE API makes no sense for me.

Masi


More information about the TYPO3-team-core mailing list