Skip to content

Commit

Permalink
Use ClientConfig from pg (#657)
Browse files Browse the repository at this point in the history
* Use ClientConfig from pg

* Remove unused TlsOptions

* Re-export ClientConfig + ConnectionConfig from pg
  • Loading branch information
brandonchinn178 committed May 23, 2021
1 parent 4e3e892 commit 94b0963
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ClientBase, QueryArrayResult, QueryResult, QueryArrayConfig, QueryConfig } from 'pg'
import { TlsOptions } from 'tls'
import { ClientBase, ClientConfig, QueryArrayResult, QueryResult, QueryArrayConfig, QueryConfig } from 'pg'
import { Name } from './operations/generalTypes'

import * as domains from './operations/domainsTypes'
Expand All @@ -19,6 +18,8 @@ import * as views from './operations/viewsTypes'
import * as mViews from './operations/viewsMaterializedTypes'
import PgLiteral from './operations/PgLiteral'

export { ClientConfig, ConnectionConfig } from 'pg'

// see ClientBase in @types/pg
export interface DB {
/* eslint-disable @typescript-eslint/no-explicit-any */
Expand Down Expand Up @@ -220,19 +221,6 @@ export interface RunnerOptionConfig {
verbose?: boolean
}

export interface ConnectionConfig {
user?: string
database?: string
password?: string
port?: number
host?: string
connectionString?: string
}

export interface ClientConfig extends ConnectionConfig {
ssl?: boolean | TlsOptions
}

export interface RunnerOptionUrl {
databaseUrl: string | ClientConfig
}
Expand Down

0 comments on commit 94b0963

Please sign in to comment.