pg-generator / ClientOptions

# Interface: ClientOptions

# Hierarchy

  • PgStructureOptions

    ClientOptions

# Properties

# client

Optional client: string | Client | ClientConfig

Either a node-postgres client (opens new window) or a configuration object or a connection string to create a node-postgres client (opens new window).

Defined in: types/index.ts:20


# connectionString

Optional connectionString: string

Connection string to connect to the database e.g. postgres://user:password@host:5432/database

Defined in: types/index.ts:35


# database

Optional database: string

Database to connect. Default from environment var: PGDATABASE || DB_DATABASE

Defined in: types/index.ts:31


# host

Optional host: string

Database host. Default from environment var: PGHOST || DB_HOST

Defined in: types/index.ts:29


# password

Optional password: string

Database password. Default from environment var: PGPASSWORD || DB_PASSWORD

Defined in: types/index.ts:27


# port

Optional port: string

Database port. Default from environment var: PGPORT || DB_PORT

Defined in: types/index.ts:33


# ssl

Optional ssl: any

Passed directly to node.TLSSocket, supports all tls.connect options

Defined in: types/index.ts:37


# user

Optional user: string

Database username. Default from environment var: PGUSER || USER || DB_USER

Defined in: types/index.ts:25