Skip to content

Commit

Permalink
fix(sql) types (#17118)
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari authored Feb 6, 2025
1 parent 1fe2c3b commit 253faed
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions packages/bun-types/bun.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

/**
Expand Down

0 comments on commit 253faed

Please sign in to comment.