Configuration options for SQL client connection and behavior
interface
SQLOptions
interface SQLOptions
const config: SQLOptions = {
host: 'localhost',
port: 5432,
user: 'dbuser',
password: 'secretpass',
database: 'myapp',
idleTimeout: 30,
max: 20,
onconnect: (client) => {
console.log('Connected to database');
}
};
- bigint?: boolean
By default values outside i32 range are returned as strings. If this is true, values outside i32 range are returned as BigInts.
- connection_timeout?: number
Maximum time in seconds to wait when establishing a connection (alias for connectionTimeout)
- idle_timeout?: number
Maximum time in seconds to wait for connection to become available (alias for idleTimeout)