mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 22:21:51 +00:00
fix(execute): revert to promise api
Several reports of increased chances to hit a deadlock since v2.2.2, and three reports of a timeout during prepare since v2.2.4. Simpler to revert to the old prepare function and api (with improvements) than to work out the solution. Look into rewriting prepare in the future or including the mariadb connector, which doesn't suffer from the same perf issues.
This commit is contained in:
1 parent
fa1cdcc668
commit
050eef58b9
4 files changed
+45
-65
No files matched your search
@@ -17,6 +17,7 @@ export const rawQuery = async (
|
||||
[query, parameters, cb] = parseArguments(invokingResource, query, parameters, cb);
|
||||
|
||||
return await new Promise((resolve, reject) => {
|
||||
//@ts-expect-error todo: patch type with executionTime
|
||||
pool.query(query, parameters, (err, result, _, executionTime) => {
|
||||
if (err) return reject(err);
|
||||
|
||||
|
||||
Reference in new issue
Block a user