You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package pg is a dependency which is needed. To put this in the devDependencies, but mentioning in the readme that it's required seems contradicting. Also updated the TypeScript reference to pg-pool instead of an any.
That's a fair point. One potential use case is to allow the user to provide another PostgreSQL client: in the case of the Redis adapter for example, you can provide a client from redis or ioredis.
Also, it would mean that we force the user to use pg@^8.0.0, which may not be great. What do you think?
Still if you want to support other pool clients, you need to define the types. Because otherwise this.pool.connect() and this.pool.query would crash. The whole code expects pg-node's pool in this argument, e.g. pool.connect() should return a client, which can have client.query(), client.removeAllListeners(), client.release(), client.on(). Don't think there's any other package that does exactly that :)
pg@^8.0.0 means pg version 8.x.x. In case a user wants another major version, npm or yarn will install the pg dependency in node_modules/@socket.io/postgres-adapter/node_modules/pg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The package
pgis a dependency which is needed. To put this in the devDependencies, but mentioning in the readme that it's required seems contradicting. Also updated the TypeScript reference to pg-pool instead of an any.