ts-postgres
Version:
PostgreSQL client in TypeScript
18 lines • 620 B
JavaScript
import { ClientImpl } from './client.js';
export { SSLMode, } from './client.js';
export { DataFormat, DataType, } from './types.js';
export { DatabaseError, ErrorLevel, TransactionStatus, } from './protocol.js';
/** Connect to the database.
*
* @remarks
* You must close the connection after use using {@link Client.end} to close
* open handles.
*
* @returns A database client, with an active connection.
*/
export async function connect(config = {}) {
const client = new ClientImpl(config);
const info = await client.connect();
return Object.assign(client, info);
}
//# sourceMappingURL=index.js.map