If you ever found it a bit cumbersome to get the actual SQL queries which have been created by Extbase, you probably came to the right place.
Please note: The documentation is not yet written. It probably never will be. This text file gives you a short overview until it is available.
I want facts. Quick. (aka Impatient Programmers Abstract)
- logs DB queries which are run against certain database table(s)
- uses system log and devlog extension
- DB queries are also stored in an array within GLOBALS for easy access
- DON'T install this extension on a production server. At least I won't do that! It is meant for development only.
Nothing. Well, everything. This is the first release.
About this extension
Working with Extbase a lot, I always found it very cumbersome to see the actual SQL queries which were produced by the Persistance layer.
cwdblog will log all DB queries which are run against the table(s) you can configure via the Extension Manager. It will be logged using the system log and the devlog extension (if installed). It will also write the queries into a global array (GLOBALS['___cwdblog']) so that it is even easier to access to debug sessions.
In order to tell cwdblog which tables to actually log, please go to the extension manager, edit the extension configuration and change the tableName regular expression as you need.
Slashes will be added, so e.g. mycool will result in /mycool/, which will let cwdblog log all queries for tables which include the string 'mycool'. This could be e.g. tx_mycoolextension_domain_model_blog or tx_myotherextension_domain_model_mycooltable.
It's a regular expression, so you can be creative!
At the moment it logs the same queries multiple times. What the heck.
Super quick install guide
Important: You need to save the configuration once, otherwise cwdblog will do nothing (because it's a polite extension).
- Install the extension via the Extension Manager
- Upon installation, the Extension Manager will show you the configuration screen
- If not, while still in the Extension Manager, switch to the Configuration tab, edit the table name regular expression
- slashes will be added, so e.g. mycooltable will result in /mycooltable/, which will let cwdblog log all queries for tables which include the string 'mycooltable'
- hit "Update" button in any case
- Reload Frontend and Backend
Again I'm using the brillant work from http://famfamfam.com for the extension icon!