-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pg-connection-string): ClientConfig helper functions #3128
base: master
Are you sure you want to change the base?
Conversation
I will rebase once #3122 lands |
2289d1a
to
385cea3
Compare
const config = parse('socket:/some path/?db=my[db]&encoding=utf8&client_encoding=bogus') | ||
const clientConfig = toClientConfig(config) | ||
clientConfig.host.should.equal('/some path/') | ||
clientConfig.database.should.equal('my[db]', 'must to be escaped and unescaped through "my%5Bdb%5D"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it should've thrown an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is current behavior according to:
subject.database.should.equal('my[db]', 'must to be escaped and unescaped trough "my%5Bdb%5D"') |
c6e6a6f
to
1b318dc
Compare
Two new functions are introduced to make it easy for TypeScript users to use a PostgresSQL connection string with pg Client. Fixes brianc#2280
1b318dc
to
9c0560a
Compare
@charmander please review this when you have a moment. This is related to #2709 |
@brianc what can we do to land |
Two new functions are introduced to make it easy for TypeScript users to use a PostgresSQL connection string with pg Client.
Fixes #2280