datasquirel/package-shared/functions/backend/db/runQuery.d.ts

31 lines
1.6 KiB
TypeScript
Raw Normal View History

2024-12-06 10:44:26 +00:00
export = runQuery;
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/**
* Run DSQL users queries
* ==============================================================================
* @param {object} params - An object containing the function parameters.
* @param {string} params.dbFullName - Database full name. Eg. "datasquire_user_2_test"
* @param {string | any} params.query - Query string or object
* @param {boolean} [params.readOnly] - Is this operation read only?
* @param {boolean} [params.local] - Is this operation read only?
* @param {import("../../../types").DSQL_DatabaseSchemaType} [params.dbSchema] - Database schema
* @param {(string | number)[]} [params.queryValuesArray] - An optional array of query values if "?" is used in the query string
* @param {string} [params.tableName] - Table Name
*
* @return {Promise<any>}
*/
declare function runQuery({ dbFullName, query, readOnly, dbSchema, queryValuesArray, tableName, local, }: {
dbFullName: string;
query: string | any;
readOnly?: boolean;
local?: boolean;
dbSchema?: import("../../../types").DSQL_DatabaseSchemaType;
queryValuesArray?: (string | number)[];
tableName?: string;
}): Promise<any>;