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