This commit is contained in:
Benjamin Toby
2025-06-01 11:39:56 +01:00
parent b28b05956b
commit 9b7c98cff6
18 changed files with 151 additions and 54 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import { ServerlessMysql } from "serverless-mysql";
import debugLog from "../logging/debug-log";
type QueryObject = {
export type ConnDBHandlerQueryObject = {
query: string;
values?: (string | number | undefined)[];
};
@@ -19,13 +19,13 @@ export default async function connDbHandler<ReturnType = any>(
*/
conn?: ServerlessMysql,
/**
* String Or `QueryObject` Array
* String Or `ConnDBHandlerQueryObject` Array
*/
query?: QueryObject["query"] | QueryObject[],
query?: ConnDBHandlerQueryObject["query"] | ConnDBHandlerQueryObject[],
/**
* Array of Values to Sanitize and Inject
*/
values?: QueryObject["values"],
values?: ConnDBHandlerQueryObject["values"],
debug?: boolean
): Promise<Return<ReturnType>> {
try {