How to view underlying SQL string for NodeJS editor?

How to view underlying SQL string for NodeJS editor?

YOMYOM Posts: 53Questions: 22Answers: 1

Hi, I'm having a hard time finding how to view the entire SQL query string from the Editor instance in my NodeJS app. I'm wanting to see it for some DB performance info

let editor = getEditorInstance(db, eventBody.columns, colConfig);

editor.debug(true);

For some reason, this code isn't outputting anything to the console on my server. Is this not the right way to do this?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,342Questions: 26Answers: 4,775
    Answer ✓

    according to this thread the steps needed are different:

    with our Node.js libraries you need to add debug: true to the Knex config as you have done, and it will dump SQL information to the console.

    Kevin

  • YOMYOM Posts: 53Questions: 22Answers: 1

    Thank you so much for the quick response, that did the trick :-)

Sign In or Register to comment.