mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix(sql) types (#17118)
This commit is contained in:
36
packages/bun-types/bun.d.ts
vendored
36
packages/bun-types/bun.d.ts
vendored
@@ -2009,35 +2009,35 @@ declare module "bun" {
|
||||
*/
|
||||
type SQLOptions = {
|
||||
/** Connection URL (can be string or URL object) */
|
||||
url: URL | string;
|
||||
url?: URL | string;
|
||||
/** Database server hostname */
|
||||
host: string;
|
||||
host?: string;
|
||||
/** Database server port number */
|
||||
port: number | string;
|
||||
port?: number | string;
|
||||
/** Database user for authentication */
|
||||
username: string;
|
||||
username?: string;
|
||||
/** Database password for authentication */
|
||||
password: string;
|
||||
password?: string;
|
||||
/** Name of the database to connect to */
|
||||
database: string;
|
||||
database?: string;
|
||||
/** Database adapter/driver to use */
|
||||
adapter: string;
|
||||
/** Maximum time in milliseconds to wait for connection to become available */
|
||||
idleTimeout: number;
|
||||
/** Maximum time in milliseconds to wait when establishing a connection */
|
||||
connectionTimeout: number;
|
||||
/** Maximum lifetime in milliseconds of a connection */
|
||||
maxLifetime: number;
|
||||
adapter?: string;
|
||||
/** Maximum time in seconds to wait for connection to become available */
|
||||
idleTimeout?: number;
|
||||
/** Maximum time in seconds to wait when establishing a connection */
|
||||
connectionTimeout?: number;
|
||||
/** Maximum lifetime in seconds of a connection */
|
||||
maxLifetime?: number;
|
||||
/** Whether to use TLS/SSL for the connection */
|
||||
tls: boolean;
|
||||
tls?: TLSOptions | boolean;
|
||||
/** Callback function executed when a connection is established */
|
||||
onconnect: (client: SQL) => void;
|
||||
onconnect?: (client: SQL) => void;
|
||||
/** Callback function executed when a connection is closed */
|
||||
onclose: (client: SQL) => void;
|
||||
onclose?: (client: SQL) => void;
|
||||
/** Maximum number of connections in the pool */
|
||||
max: number;
|
||||
max?: number;
|
||||
/** By default values outside i32 range are returned as strings. If this is true, values outside i32 range are returned as BigInts. */
|
||||
bigint: boolean;
|
||||
bigint?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user