Better pg-promise connectivity
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I saw the way you used database connection recently:
``` js
this.listenClient = new pg.pg.Client(config.db);
this.listenClient.connect((err, client) => {
```
and I finally decided to make an improvement on the protocol in this area, which I thought of for a while...
See the new [v.4.3.4 release](https://github.com/vitaly-t/pg-promise/releases/tag/v.4.3.4).
If you call `db.connect()` now, the resolved object will also contain `client`, which you can use. But that's from the connection pool.
If you want exactly the way you use it, call `db.connect({direct: true})` to get an independent `client`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.