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

Martin Kutschker masi-no at spam-typo3.org
Thu Feb 11 12:36:00 CET 2010


Oliver Klee schrieb:
> Hi,
> 
> Steffen Kamper schrieb:
>> 1) integrate truncate in DELETE, but don't do it automatic, add a
>> parameter eg $useTruncate = TRUE so we don't have magic but control
>>
>> 2) use a new function for truncate
>>
>> 3) mix 1) and 2) and use TRUNCATE function inside delete when flag is true
> 
> +1 for 2).
> 
> (Adding a parameter to an existing function to make it do something
> different instead of adding a new, clearly named function is confusing
> IMHO. We already have too many too long functions with too many
> parameters which makes theses functions very hard to unit-test and to
> maintain.)

+1 for 2)

As Oliver said, don't mix up distinct functionality. Both commands are only similar on the surface.

Masi


More information about the TYPO3-team-core mailing list