refactor(execute): remove mysql2 promise api

Changing from promises to callbacks gives ~20% increased performance.
Single prepared statements won't use transactions (no extra overhead).
This commit is contained in:
Linden committed 2022-03-30 05:54:54 +11:00
1 parent 7b01898959
commit ef0dfaac84
3 files changed
+74 -49

No files matched your search

+2 -1
View File
@@ -12,6 +12,7 @@ export type TransactionQuery = {
values?: CFXParameters;
};
export type CFXParameters = Record<string, unknown> | unknown[];
// working with this type is impossible but at least we can pretend to be strictly typed
export type CFXParameters = any[];
export type CFXCallback = (result: QueryResponse | number | null) => void;