source: node_modules/pg-connection-string/index.d.ts

main
Last change on this file was 62b2964, checked in by Klimentina Efremova <klimentina08642@…>, 2 weeks ago

Project Handcraft Marketplace

  • Property mode set to 100644
File size: 952 bytes
RevLine 
[62b2964]1import { ClientConfig } from 'pg'
2
3export function parse(connectionString: string, options?: Options): ConnectionOptions
4
5export interface Options {
6 // Use libpq semantics when interpreting the connection string
7 useLibpqCompat?: boolean
8}
9
10interface SSLConfig {
11 ca?: string
12 cert?: string | null
13 key?: string
14 rejectUnauthorized?: boolean
15}
16
17export interface ConnectionOptions {
18 host: string | null
19 password?: string
20 user?: string
21 port?: string | null
22 database: string | null | undefined
23 client_encoding?: string
24 ssl?: boolean | string | SSLConfig
25 sslnegotiation?: 'postgres' | 'direct'
26
27 application_name?: string
28 fallback_application_name?: string
29 options?: string
30 keepalives?: number
31
32 // We allow any other options to be passed through
33 [key: string]: unknown
34}
35
36export function toClientConfig(config: ConnectionOptions): ClientConfig
37export function parseIntoClientConfig(connectionString: string): ClientConfig
Note: See TracBrowser for help on using the repository browser.