-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] How to get the query string before execution? #818
Comments
Describe executes the query. Without correct query and correct connection it will not give me the query string: let where = sql`WHERE a = 1`;
console.log(await sql`SELECT ERROR ${where}`.describe()); // column "error" does not exist This shows only error, but not the actual query string. What do I do wrong? |
Found a "tricky" way: #760 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. Is there any way to get the actual sql query string before/without the exucution?
I know we have sql.statement but it is not available before the query exucution and if the query has errors (while building it dynamically) I don't know how to debug it properly.
I found
query.strings
but it's...well not what i need.The text was updated successfully, but these errors were encountered: