mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
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>
26 lines
689 B
TypeScript
26 lines
689 B
TypeScript
import { ClientConfig } from 'pg'
|
|
|
|
export function parse(connectionString: string, options: Options): ConnectionOptions
|
|
|
|
export interface Options {
|
|
// Use libpq semantics when interpreting the connection string
|
|
useLibpqCompat?: boolean
|
|
}
|
|
|
|
export interface ConnectionOptions {
|
|
host: string | null
|
|
password?: string
|
|
user?: string
|
|
port?: string | null
|
|
database: string | null | undefined
|
|
client_encoding?: string
|
|
ssl?: boolean | string
|
|
|
|
application_name?: string
|
|
fallback_application_name?: string
|
|
options?: string
|
|
}
|
|
|
|
export function toClientConfig(config: ConnectionOptions): ClientConfig
|
|
export function parseIntoClientConfig(connectionString: string): ClientConfig
|