[TYPO3-mvc] output the created sql
Jochen Rau
jochen.rau at typoplanet.de
Mon Apr 19 13:11:30 CEST 2010
Hi Masi.
On 19.04.10 12:16, Martin Kutschker wrote:
> Jochen Rau schrieb:
>>
>> But they have implemented $db->explain() which gives a nice printout of
>> the SQL query behavior. We could implement this in Extbase, too. So you
>> can use $query->explain() instead of $query->execute().
>
> Asking the DB to show you the query plan is nice, so +1 for the idea, but sometimes yoou really want
> only to see the SQL statement and nothing more. A simple $query->show() or $query->showSql() would do.
The Query object isn't aware of the technical backend and thus SQL. The
Query must delegate explain() (or show()) to the Storage Backend. The
Backend then will provide the information needed to "explain" what's
happening. In case of an SQL Backend this might be "EXPLAIN SELECT
....". In case of a File Backend this can be path information, file size
....
Regards
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list