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,5 +1,5 @@
import { ServerlessMysql } from "serverless-mysql";
type QueryObject = {
export type ConnDBHandlerQueryObject = {
query: string;
values?: (string | number | undefined)[];
};
@@ -17,11 +17,11 @@ export default 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"], debug?: boolean): Promise<Return<ReturnType>>;
values?: ConnDBHandlerQueryObject["values"], debug?: boolean): Promise<Return<ReturnType>>;
export {};
+1 -1
View File
@@ -25,7 +25,7 @@ function connDbHandler(
*/
conn,
/**
* String Or `QueryObject` Array
* String Or `ConnDBHandlerQueryObject` Array
*/
query,
/**