Skip to content

Commit

Permalink
fix: pool client properties
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-bq committed Dec 12, 2024
1 parent e041377 commit 0ed203a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mysql/lib/dialect/mysql2_driver_dialect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class MySQL2DriverDialect implements DriverDialect {
const finalPoolConfig: PoolOptions = {};
const finalClientProps = WrapperProperties.removeWrapperProperties(props);

Object.assign(finalPoolConfig, finalClientProps);
Object.assign(finalPoolConfig, Object.fromEntries(finalClientProps.entries()));
finalPoolConfig.connectionLimit = poolConfig?.maxConnections;
finalPoolConfig.idleTimeout = poolConfig?.idleTimeoutMillis;
finalPoolConfig.maxIdle = poolConfig?.maxIdleConnections;
Expand Down
2 changes: 1 addition & 1 deletion pg/lib/dialect/node_postgres_driver_dialect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class NodePostgresDriverDialect implements DriverDialect {
const finalPoolConfig: pkgPg.PoolConfig = {};
const finalClientProps = WrapperProperties.removeWrapperProperties(props);

Object.assign(finalPoolConfig, finalClientProps);
Object.assign(finalPoolConfig, Object.fromEntries(finalClientProps.entries()));
finalPoolConfig.max = poolConfig?.maxConnections;
finalPoolConfig.idleTimeoutMillis = poolConfig?.idleTimeoutMillis;
finalPoolConfig.allowExitOnIdle = poolConfig?.allowExitOnIdle;
Expand Down

0 comments on commit 0ed203a

Please sign in to comment.