Skip to content

Instantly share code, notes, and snippets.

@groovecoder
Created October 29, 2019 17:26
Show Gist options
  • Save groovecoder/253838cb3ac11e113c9d3f8b81f027a0 to your computer and use it in GitHub Desktop.
Save groovecoder/253838cb3ac11e113c9d3f8b81f027a0 to your computer and use it in GitHub Desktop.
if (AppConstants.NODE_ENV === "dev") {
knex.on("query", async (queryData) => {
debugger;
console.log(queryData);
});
knex.on("query-response", async (response, obj, builder) => {
debugger;
const explainSql = `EXPLAIN VERBOSE ${builder}`;
const res = await knex.raw(explainSql);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment