MatteoGioioso / MatteoGioioso/serverless-pg
Expose a getter or access to _client in the ServerlessClient class
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 324
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to use Zapatos, pg ORM, with the benefits of ServerlessClient.
https://jawj.github.io/zapatos/#sql-tagged-template-strings
To use Zapatos, the .run method requires a pg.Client or pg.Pool. ServerlessClient itself cannot satisfy the pg.ClientBase interface.
I've already successfully made queries with Zapatos by ignoring the type checker and passing ._client. However, I'd like to do this without using ts-ignore everywhere.
Contributor guide
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 locating the ServerlessClient class and its _client field, then review how the client is exposed and typed. The change is complete when Zapatos' .run method can receive the underlying pg.Client or pg.Pool without using ts-ignore; no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, postgresql
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100