@clickup/pg-microsharding
Version:
Microshards support for PostgreSQL
18 lines • 782 B
TypeScript
import { Client as PgClient } from "pg";
/**
* A connected PG client with extra methods.
*/
export declare class Client extends PgClient {
serverVersion(): Promise<number[]>;
currentWalInsertLsn(): Promise<string>;
confirmedFlushLsn(slotName: string): Promise<string>;
}
/**
* Node-postgres doesn't really support sslmode=prefer: it treats it as "ssl is
* required". This is a different default than e.g. psql has when no PGSSLMODE
* is set. Also, it is not always able to locate the local certs, so we have to
* use rejectUnauthorized=false. Thus, we try to set up an SSL connection first,
* and if it fails, then we try non-SSL.
*/
export declare function createConnectedClient(dsn: string): Promise<Client>;
//# sourceMappingURL=createConnectedClient.d.ts.map