[question] How to get the query string before execution?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 374
- Avg merge
- 11d 16h
- Merged PRs (30d)
- 1
Description
let where = sql`col = 1`;
let query = sql`SELECT * FROM WHERE ${where}`;
let sql_as_string = query.(what?);
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the query.strings property and sql.statement behavior mentioned in the issue, then trace how dynamically built queries are represented before execution. Define what a pre-execution SQL representation should contain and how it should behave for queries that fail during construction; no implementation file or test is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, postgresql, typescript
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100