Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 2efda9f

Browse files
committed
fix(db/pool): don't manually fetch connection
1 parent 31de350 commit 2efda9f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/database/pool.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ export async function createConnectionPool() {
1616
connection.query(mysql_transaction_isolation_level);
1717
});
1818

19-
using conn = await getConnection();
20-
21-
const result = (await conn.query('SELECT VERSION() as version')) as RowDataPacket[];
19+
const [result] = (await dbPool.query('SELECT VERSION() as version')) as RowDataPacket[];
2220
dbVersion = `^5[${result[0].version}]`;
2321

2422
console.log(`${dbVersion} ^2Database server connection established!^0`);

0 commit comments

Comments
 (0)