type
bun.SQL.Options
type Options = SQLiteOptions | PostgresOrMySQLOptions
Configuration options for SQL client connection and behavior
const config: Bun.SQL.Options = {
hostname: 'localhost',
port: 5432,
username: 'dbuser',
password: 'secretpass',
database: 'myapp',
idleTimeout: 30,
max: 20,
onconnect: (err) => {
if (!err) console.log('Connected to database');
}
};