We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4d7829 commit 83d0bdbCopy full SHA for 83d0bdb
1 file changed
docs/en/index.rst
@@ -316,3 +316,20 @@ Helper Functions
316
317
* ``sql()`` Dumps out the SQL from an ORM query.
318
* ``sqld()`` Dumps out the SQL from an ORM query, and exits.
319
+
320
+Tracing query execution
321
+=======================
322
323
+Sometimes you need to know where specific queries are being executed in your app.
324
+To get this kind of information you can add the ``SqlTraceTrait`` to your Table class like so::
325
326
+ use DebugKit\Model\Table\SqlTraceTrait;
327
328
+ class CategoriesTable extends Table
329
+ {
330
+ use SqlTraceTrait;
331
+ }
332
333
+This will add the following information to the SQL log::
334
335
+ /* APP/Controller/CategoriesController.php (line 20) *)
0 commit comments