egon-orm-workspace / @egon-orm/mysql / MysqlOptions
Interface: MysqlOptions ​
Defined in: mysql/src/options.ts:46
The options of mysql. Every option may also be given as undefined, which is the same as leaving it out (connectionString: process.env.DATABASE_URL).
Connect with connectionString, or with host, port, user, password, database and ssl, or both (the separate settings win). There is no time zone option: the session is always UTC.
Example ​
const options: MysqlOptions = {
connectionString: process.env.DATABASE_URL,
pool: { max: 10, idleTimeoutMs: 30_000, connectionTimeoutMs: 5_000 },
};Properties ​
connectionString? ​
readonly connectionString?: string;Defined in: mysql/src/options.ts:48
A mysql:// URL.
database? ​
readonly database?: string;Defined in: mysql/src/options.ts:53
host? ​
readonly host?: string;Defined in: mysql/src/options.ts:49
password? ​
readonly password?: string;Defined in: mysql/src/options.ts:52
planCacheSize? ​
readonly planCacheSize?: number;Defined in: mysql/src/options.ts:59
How many compiled query shapes the adapter keeps. Default 1,000.
pool? ​
readonly pool?: MysqlPoolOptions;Defined in: mysql/src/options.ts:57
Settings for the pool the adapter creates.
port? ​
readonly port?: number;Defined in: mysql/src/options.ts:50
ssl? ​
readonly ssl?: string | SslOptions;Defined in: mysql/src/options.ts:55
TLS options for node:tls, or a profile name mysql2 knows.
user? ​
readonly user?: string;Defined in: mysql/src/options.ts:51

