Major version update. Major bugfixes. Security vulnerabilites fixed
This commit is contained in:
Vendored
+16
-2
@@ -8,18 +8,32 @@ type Param<T extends {
|
||||
tableName: string;
|
||||
dbFullName?: string;
|
||||
count?: boolean;
|
||||
/**
|
||||
* Restrict to a single row id. Always combined with AND, regardless of
|
||||
* `searchOperator`.
|
||||
*/
|
||||
targetId?: number | string;
|
||||
};
|
||||
type Return = {
|
||||
string: string;
|
||||
values: SQLInsertGenValueType[];
|
||||
/**
|
||||
* Just the `WHERE ...` clause (empty if there are no conditions) and its
|
||||
* bound values. Used by UPDATE and DELETE.
|
||||
*/
|
||||
where: {
|
||||
string: string;
|
||||
values: SQLInsertGenValueType[];
|
||||
};
|
||||
};
|
||||
/**
|
||||
* # SQL Query Generator
|
||||
* @description Generates an SQL Query for node module `mysql` or `serverless-mysql`
|
||||
* @description Generates a parameterized SQLite SELECT query. All values are
|
||||
* returned in `values` to be bound; identifiers are validated.
|
||||
*/
|
||||
export default function sqlGenerator<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}>({ tableName, genObject, dbFullName, count }: Param<T>): Return;
|
||||
}>({ tableName: passedTableName, genObject, count, targetId, }: Param<T>): Return;
|
||||
export {};
|
||||
|
||||
Reference in New Issue
Block a user