26 lines
780 B
TypeScript
26 lines
780 B
TypeScript
import { DbContextsArray } from "../../backend/db/runQuery";
|
|
import { ApiGetQueryObject } from "../../../types";
|
|
type Param<T extends {
|
|
[key: string]: any;
|
|
} = {
|
|
[key: string]: any;
|
|
}> = {
|
|
query: string | ApiGetQueryObject<T>;
|
|
queryValues?: (string | number)[];
|
|
dbFullName: string;
|
|
tableName?: string;
|
|
dbSchema?: import("../../../types").DSQL_DatabaseSchemaType;
|
|
debug?: boolean;
|
|
dbContext?: (typeof DbContextsArray)[number];
|
|
forceLocal?: boolean;
|
|
};
|
|
/**
|
|
* # Get Function FOr API
|
|
*/
|
|
export default function apiGet<T extends {
|
|
[key: string]: any;
|
|
} = {
|
|
[key: string]: any;
|
|
}>({ query, dbFullName, queryValues, tableName, dbSchema, debug, dbContext, forceLocal, }: Param<T>): Promise<import("../../../types").GetReturn>;
|
|
export {};
|