Open IAkumaI opened 4 months ago
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: https://github.com/porsager/postgres/discussions/760 But maybe there is another more "right" way? There is nothing about this in the docs, btw.
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.