feat(mysql): add pool size options for each connection (#11810)

Co-authored-by: 아이작_조서환 <wtae1216@sooplive.com>
This commit is contained in:
Giorgio Boa 2025-11-30 12:31:52 +01:00 committed by GitHub
parent 835647ac92
commit 67f793feaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -43,4 +43,10 @@ export interface MysqlConnectionCredentialsOptions {
* Database socket path
*/
readonly socketPath?: string
/**
* Maximum number of clients the pool should contain.
* for each connection
*/
readonly poolSize?: number
}

View File

@ -1287,7 +1287,7 @@ export class MysqlDriver implements Driver {
port: credentials.port,
ssl: options.ssl,
socketPath: credentials.socketPath,
connectionLimit: options.poolSize,
connectionLimit: credentials.poolSize ?? options.poolSize,
},
options.acquireTimeout === undefined
? {}