datasquirel/dist/package-shared/functions/backend/dbHandler.d.ts
Benjamin Toby c37d105dee Updates
2025-07-09 20:30:45 +01:00

25 lines
654 B
TypeScript

import { DSQL_TableSchemaType } from "../../types";
import { ConnectionConfig } from "mariadb";
type Param<T extends {
[k: string]: any;
} = {
[k: string]: any;
}> = {
query: string;
values?: string[] | object;
noErrorLogs?: boolean;
database?: string;
tableSchema?: DSQL_TableSchemaType;
config?: ConnectionConfig;
};
/**
* # Main DB Handler Function
* @requires DSQL_DB_CONN - Gobal Variable for Datasquirel Database
*/
export default function dbHandler<T extends {
[k: string]: any;
} = {
[k: string]: any;
}>({ query, values, noErrorLogs, database, config, }: Param<T>): Promise<T[] | T | null>;
export {};