Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pgc4d/src/mod.ts>ConnectPgOptions

A full-featured PostgreSQL Client for Deno
Latest
interface ConnectPgOptions
import { type ConnectPgOptions } from "https://deno.land/x/pgc4d@v1.3.6/src/mod.ts";

Properties

optional
transport: "tcp" | "unix"

Transport to use. Use 'tcp' for both unencrypted TCP as well as TLS ("SSL"). Default: tcp

optional
hostname: string

A literal IP address or host name that can be resolved to an IP address. Default: 127.0.0.1.

optional
port: number

When using transport tcp, the port to connect to. Default: 5432.

optional
path: string

When using transport unix, the filesystem path to the socket.

optional
username: string

Username to use when connecting. Required.

optional
password: string

Password to authenticate with. Required unless trust method is enabled server-side.

optional
database: string

Defaults to username.

optional
sslMode: "disable" | "verify-full"

Only applies to tcp transport. Defaults to 'verify-full'. See: https://www.postgresql.org/docs/12/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS

optional
certFile: string

Path to the CA certificate to verify server's certificate against.

optional
connectionParams: { [name: string]: string | undefined; }

Arbitrary connection parameters to send to the server, for example application_name.

optional
onNotice: (notice: PgNotice) => Promise<void>

Notice received from server. Default implementation writes to console.log.

optional
debug: boolean

Log debugging messages using console.log. Default: false.