WIP: Rewrite to TS & Cleanup

This commit is contained in:
dunak-debug committed 2021-12-26 02:21:46 +01:00
1 parent 893b802029
commit 4498dddbac
27 files changed
+508 -504

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { RowDataPacket, ResultSetHeader, OkPacket } from 'mysql2';
export type QueryResponse = RowDataPacket[][] | RowDataPacket[] | OkPacket | OkPacket[] | ResultSetHeader;
export type QueryType = 'insert' | 'update' | 'scalar' | 'single' | null;
export type TransactionQuery = {
query: string;
parameters?: CFXParameters;
values?: CFXParameters;
};
export type CFXParameters = Record<string, unknown> | unknown[];
export type CFXCallback = (result: QueryResponse | RowDataPacket | number | null) => void;