kysely
    Preparing search index...

    Interface PostgresDialectConfig

    Config for the PostgreSQL dialect.

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

    Properties

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

    import { PostgresDialect } from 'kysely'
    import { Pool } from 'pg'
    import Cursor from 'pg-cursor'
    // or import * as Cursor from 'pg-cursor'

    new PostgresDialect({
    cursor: Cursor,
    pool: new Pool('postgres://localhost:5432/mydb')
    })
    onCreateConnection?: (connection: DatabaseConnection) => Promise<void>

    Called once for each created connection.

    onReserveConnection?: (connection: DatabaseConnection) => Promise<void>

    Called every time a connection is acquired from the pool.

    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