Ability to inspect query fragments without database connection
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 374
- Avg merge
- 11d 16h
- Merged PRs (30d)
- 1
Description
Thanks for building this library, it's very impressive and I'm enjoying using it so far.
It would be very helpful if I could unit test some of my query-generating functions without the need for a DB connection. For example, with an .inspect() method or similar that returns a simple {text, values} structure or similar without inducing a DB round-trip.
There appears to be some discussion around this requirement in https://github.com/porsager/postgres/discussions/760 and the current workaround appears to be to catch the exception and then inspect the query and parameters properties on the exception, which may not be ideal.
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 with the query-generating functions and the current workaround described in the issue: catching the exception and reading its query and parameters, then review discussion 760 for the expected API. Done means callers can inspect a query and receive its text and values without a database round-trip, with the behavior of the proposed .inspect()-style interface agreed and covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, postgresql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100