This commit is contained in:
Benjamin Toby
2025-04-18 12:05:10 +01:00
parent fb0bc4b753
commit 8d38f99bf1
180 changed files with 3 additions and 3974 deletions
-25
View File
@@ -1,25 +0,0 @@
import { ServerlessMysql } from "serverless-mysql";
type QueryObject = {
query: string;
values?: (string | number | undefined)[];
};
type Return<ReturnType = any> = ReturnType | null;
/**
* # Run Query From MySQL Connection
* @description Run a query from a pre-existing MySQL/Mariadb Connection
* setup with `serverless-mysql` npm module
*/
export default function connDbHandler<ReturnType = any>(
/**
* ServerlessMySQL Connection Object
*/
conn?: ServerlessMysql,
/**
* String Or `QueryObject` Array
*/
query?: QueryObject["query"] | QueryObject[],
/**
* Array of Values to Sanitize and Inject
*/
values?: QueryObject["values"]): Promise<Return<ReturnType>>;
export {};