Config for the PostgreSQL dialect.

interface PostgresDialectConfig {
    cursor?: PostgresCursorConstructor;
    onCreateConnection?: ((connection) => Promise<void>);
    pool: PostgresPool | (() => Promise<PostgresPool>);
}

Properties

https://github.com/brianc/node-postgres/tree/master/packages/pg-cursor

import Cursor from 'pg-cursor'
// or
import * as Cursor from 'pg-cursor'

new PostgresDialect({
cursor: Cursor
})
onCreateConnection?: ((connection) => Promise<void>)

Called once for each created connection.

Type declaration

pool: PostgresPool | (() => Promise<PostgresPool>)

A postgres Pool instance or a function that returns one.

If a function is provided, it's called once when the first query is executed.

https://node-postgres.com/apis/pool

Type declaration