Documentation
    Preparing search index...
    • Builds a pg from the given database options. Validates SSL certificates when SSL is enabled.

      Parameters

      • dbOptions: {
            database: string;
            host: string;
            password: string;
            port: number;
            schema: string;
            ssl:
                | { ca: string; cert: string; enabled: true; key: string }
                | { ca?: string; cert?: string; enabled: false; key?: string };
            username: string;
        }

        The database configuration object.

      Returns PoolConfig

      A PoolConfig ready to be passed to a pg.Pool constructor.