Optional
autocreateOptional
backoffOptional
connect_Connect timeout in seconds
Optional
connectionConnection parameters
Optional
databaseName of database to connect to
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
Optional
hostOptional
hostnamePostgres ip address or domain name (an alias for host
)
Optional
idle_Idle connection timeout in seconds
Optional
keep_Optional
maxMax number of connections
Optional
max_Optional
no_Disable prepared mode
Optional
oncloseOptional
onnoticeCalled when a notice is received
Optional
onparameter(key; value) when a server param change
Optional
passPassword of database user (an alias for password
)
Optional
passwordPassword of database user
Optional
pathOptional
portOptional
prepareEnables prepare mode.
Optional
publicationsPublications to subscribe to (only relevant when calling sql.subscribe()
)
Optional
sslHow to deal with ssl (can be a tls.connect option object)
Optional
target_Use 'read-write' with multiple hosts to ensure only connecting to primary
Optional
timeoutIdle connection timeout in seconds
Optional
transformTransform hooks
Optional
column?: Transforms incoming and outgoing column names
Optional
row?: { from?: (row: Row) => any } | ((row: Row) => any)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
Optional
usernameUsername of database user (an alias for user
)
Should the schema table be automatically created (the v0 schema effectively). Defaults to
true
.