File tree 2 files changed +6
-4
lines changed
packages/pg-connection-string
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export interface ConnectionOptions {
8
8
database : string | null | undefined
9
9
client_encoding ?: string
10
10
ssl ?: boolean | string
11
- multihost ?: string | null
11
+ multihost ?: string [ ] | null
12
12
13
13
application_name ?: string
14
14
fallback_application_name ?: string
Original file line number Diff line number Diff line change 4
4
//MIT License
5
5
6
6
const { URL } = require ( 'url' )
7
- //parses a connection string
7
+ //
8
+ /**
9
+ * parses a connection string
10
+ * @param str - a connection string to Postgres
11
+ */
8
12
function parse ( str ) {
9
13
//unix socket
10
14
if ( str . charAt ( 0 ) === '/' ) {
11
15
const config = str . split ( ' ' )
12
16
return { host : config [ 0 ] , database : config [ 1 ] }
13
17
}
14
18
15
- const multihost = str . includes ( ',' )
16
-
17
19
// Check for empty host in URL
18
20
19
21
const config = { }
You can’t perform that action at this time.
0 commit comments