diff --git a/src/connectors/postgresql.ts b/src/connectors/postgresql.ts index a5c916a..485444f 100644 --- a/src/connectors/postgresql.ts +++ b/src/connectors/postgresql.ts @@ -1,16 +1,16 @@ -import { Client, ClientConfig } from "pg"; +import pg from "pg"; import type { Connector, Statement } from "../types"; -export type ConnectorOptions = { url: string } | ClientConfig; +export type ConnectorOptions = { url: string } | pg.ClientConfig; export default function postgresqlConnector(opts: ConnectorOptions) { - let _client: undefined | Client | Promise; + let _client: undefined | pg.Client | Promise; function getClient() { if (_client) { return _client; } - const client = new Client("url" in opts ? opts.url : opts); + const client = new pg.Client("url" in opts ? opts.url : opts); _client = client.connect().then(() => { _client = client; return _client;