mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
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:
1 parent
dd05cb8e68
commit
dea98f7c5b
5 files changed
+22
-33
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user