Skip to content

Using pg-promise with an existing pg client / connection #876

Answered by vitaly-t
innermatrix asked this question in Q&A
Discussion options

You must be logged in to vote

This library is built mainly around a connection pool, not individual/separate connections.

The only thing this library has in terms of interconnectivity is property db.$pool, which exposes the underlying pool object. There is nothing else. It cannot wrap itself around an external Client interface, I'm afraid.

In theory, it should be easy to implement, perhaps by extending method connect and adding option client, it would just need some work ;)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by innermatrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants