Herman J. Radtke III
6be857e9d3
chore(pg-connection-string): use tsx for tests
2025-05-06 06:49:24 -04:00
Brian C
9e7a5d97cf
Replace all usages of var with let / const - eslint auto applied ( #3444 )
2025-04-27 11:50:33 -05:00
Patrick Malouin
81ec0635fc
feat(pg-connection-string): get closer to libpq semantics for sslmode
...
Allows user to change the semantics of `sslmode` to be as close as possible to libpq semantics. The opt in can be enabled using `useLibpqCompat` parsing option or the non-standard `uselibpqcompat` query string parameter.
---------
Co-authored-by: Charmander <~@charmander.me>
Co-authored-by: Herman J. Radtke III <herman@hermanradtke.com>
2025-04-20 08:13:33 -04:00
Herman J. Radtke III
5a8b1a7d24
feat(pg-connection-string): ClientConfig helper functions
...
Two new functions are introduced to make it easy for TypeScript
users to use a PostgresSQL connection string with pg Client.
Fixes #2280
2025-04-08 20:06:28 -04:00
Alex Anderson
f2279f3529
pg-connection-string/test: remove unused var ( #3243 )
...
Co-authored-by: alxndrsn <alxndrsn>
2024-06-05 10:51:13 -05:00
Juan GP
0096856e2e
reorder user-password-host-port-database appearences ( #3207 )
2024-05-10 12:03:11 -05:00
Rafi Shamim
cf24ef28ee
pg-connection-string: avoid clobbering port from queryparams ( #2833 )
...
If the connection string is something like:
postgresql://demo:password@/postgres?host=localhost&port=26258
Then the port from the query parameters should be used. Previously, the
parsing function would end up with a null port, and the default port
would end up being used by the connecetion package.
2023-07-21 11:57:02 -05:00
Adam Jones
c38ecf3405
Fix connection string parsing for overriden hosts ( #2977 )
...
* Add failing test
* Fix test
This corresponds to what was line 48 previously, see https://github.com/brianc/node-postgres/pull/2971/files#diff-08a5e82487ebd9b43751630019753901fae0a111f8d009ad2e9d194445e96922L48
* Update packages/pg-connection-string/index.js
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
---------
Co-authored-by: Brian C <brian.m.carlson@gmail.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
2023-05-31 10:24:08 -05:00
Pete Bacon Darwin
f305419676
Use URL rather than url.parse() in pg-connection-string
...
Swapping the deprecated Node.js API for the modern cross
environment API.
2023-05-15 07:29:07 +01:00
Benjie Gillam
e421167d46
Add ssl=true into the test
2020-10-04 13:33:21 -05:00
Benjie Gillam
9cbea21587
Solve issues caused by config.ssl = true
2020-10-04 13:33:21 -05:00
Benjie Gillam
6be3b9022f
Add support for ?sslmode connection string param
2020-10-04 13:33:21 -05:00
Rafi Shamim
06cdf3e9f0
Support options connection parameter
...
This supports the connection parameter documented here:
https://www.postgresql.org/docs/9.1/libpq-connect.html#LIBPQ-CONNECT-OPTIONS
2020-05-14 10:07:35 -04:00
Brian M. Carlson
3a831fc77c
Run lint --fix
2020-04-28 10:02:38 -05:00
Brian M. Carlson
4aff01ef8f
Add 'packages/pg-connection-string/' from commit '5233b3e77e396a368130709e762fca836290a528'
...
git-subtree-dir: packages/pg-connection-string
git-subtree-mainline: 35328807e3612cb267bee86dccb2551ad186624a
git-subtree-split: 5233b3e77e396a368130709e762fca836290a528
2020-04-28 09:50:40 -05:00