nextras / orm

Orm with clean object design, smart relationship loading and powerful collections.
https://nextras.org/orm
MIT License
309 stars 59 forks source link

How to inspect SQL queries? #146

Closed MartyIX closed 8 years ago

MartyIX commented 8 years ago

Hi,

Nette\Database allows to track SQL queries in the debugger bar. Can I enable SQL query logging in Nextras\ORM? It would help me debug my application and verify that everything works as it is supposed.

Thanks, Martin

hrach commented 8 years ago

Well, orm uses nextras dbal which has the Nette DI extension that enables it's own panel for tracy. Of course, you can add your own hook on dbal's connection to log it somewhere as you wish.

MartyIX commented 8 years ago

Thanks.

note to self: \Nextras\Dbal\Connection::$onQuery