refactor(database): move from mysql2/promise to callback api

Micro-optimisation for rawQuery. rawExecute and rawTransaction will
still utilise the promise api (pool.promise()).
This commit is contained in:
Linden committed 2022-03-25 06:07:57 +00:00
1 parent dd05cb8e68
commit dea98f7c5b
5 files changed
+22 -33

No files matched your search

+2 -2
View File
@@ -16,11 +16,11 @@ export const rawExecute = async (
if (!type) throw new Error(`Prepared statements only accept SELECT, INSERT, UPDATE, and DELETE methods.`);
parameters = parseExecute(query, parameters);
parameters = parseExecute(parameters);
await scheduleTick();
const connection = await pool.getConnection();
const connection = await pool.promise().getConnection();
let response: QueryResponse;
try {