Optional
autocreateOptional
backoffOptional
connect_Connect timeout in seconds
process.env['PGCONNECT_TIMEOUT']
Optional
connectionConnection parameters
Optional
databaseName of database to connect to
process.env['PGDATABASE'] || options.user
Optional
dbName of database to connect to (an alias for database
)
Optional
debugIs called with (connection; query; parameters)
Optional
fetch_Automatically fetches types on connect
true
Optional
hostOptional
hostnamePostgres ip address or domain name (an alias for host
)
Optional
idle_Idle connection timeout in seconds
process.env['PGIDLE_TIMEOUT']
Optional
keep_Optional
maxMax number of connections
10
Optional
max_Optional
no_Disable prepared mode
use "prepare" option instead
Optional
oncloseOptional
onnoticeCalled when a notice is received
Called when a notice is received
console.log
console.log
Optional
onparameter(key; value) when a server param change
(key; value) when a server param change
Optional
passPassword of database user (an alias for password
)
Optional
passwordPassword of database user
process.env['PGPASSWORD']
Optional
pathOptional
portOptional
prepareEnables prepare mode.
true
Optional
publicationsPublications to subscribe to (only relevant when calling sql.subscribe()
)
'alltables'
Optional
sslHow to deal with ssl (can be a tls.connect option object)
false
Optional
target_Use 'read-write' with multiple hosts to ensure only connecting to primary
process.env['PGTARGETSESSIONATTRS']
Optional
timeoutIdle connection timeout in seconds
use "idle_timeout" option instead
Optional
transformTransform hooks
Optional
column?: { Transforms incoming and outgoing column names
Optional
row?: { Transforms entire rows
Optional
undefined?: anyTransforms outcoming undefined values
Optional
value?: { Transforms incoming and outgoing row values
Optional
typesArray of custom types; see more in the README
Optional
urlURL to reach the database on.
Optional
userUsername of database user
process.env['PGUSERNAME'] || process.env['PGUSER'] || require('os').userInfo().username
Optional
usernameUsername of database user (an alias for user
)
Generated using TypeDoc
Should the schema table be automatically created (the v0 schema effectively). Defaults to
true
.