How to get last executed query in cakephp3



Please help me to solve below queries on cakephp3

  1. How can i get executed query in cakephp3 in case of save & delete. My requirement is to save query in database.

  2. Is it possible to get the query inside any of callback function like eg. BeforeSave, AfterSave, AfterSaveCommit, BeforeDelete … etc.