25 lines
576 B
TypeScript
25 lines
576 B
TypeScript
import { ServerQueryParam } from "../../../types";
|
|
type Param<T extends {
|
|
[key: string]: any;
|
|
} = {
|
|
[key: string]: any;
|
|
}> = {
|
|
genObject?: ServerQueryParam<T>;
|
|
tableName: string;
|
|
dbFullName?: string;
|
|
};
|
|
type Return = {
|
|
string: string;
|
|
values: string[];
|
|
};
|
|
/**
|
|
* # SQL Query Generator
|
|
* @description Generates an SQL Query for node module `mysql` or `serverless-mysql`
|
|
*/
|
|
export default function sqlGenerator<T extends {
|
|
[key: string]: any;
|
|
} = {
|
|
[key: string]: any;
|
|
}>({ tableName, genObject, dbFullName }: Param<T>): Return;
|
|
export {};
|