1.2.4 • Published 7 months ago
@types/sql-template v1.2.4
Installation
npm install --save @types/sql-template
Summary
This package contains type definitions for sql-template (https://github.com/131/sql-template).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sql-template.
index.d.ts
// Type definitions for sql-template 1.2
// Project: https://github.com/131/sql-template
// Definitions by: Jaap Taal <https://github.com/q42jaap>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export = SQL;
declare function SQL(parts: TemplateStringsArray, ...values: any[]): SQL.Fragment;
declare namespace SQL {
interface Fragment {
raw: string;
text: string;
values?: any[] | undefined;
}
type ChainFn = (values: any[], part: string) => string;
type Transformer = (values: any[], str: string, chain: ChainFn) => void;
function insert(table: string, values: object): Fragment;
function insert_bulk(table: string, keys: string[], values: any[][]): Fragment;
function update(table: string, values: object, where?: any): Fragment;
function select(table: string, where?: any, cols?: string, extra?: string): Fragment;
function search_blob(search_field: string, qs: string, main_field?: string, LIKE?: string): Fragment | false;
const transformers: {[key: string]: Transformer};
}
Additional Details
- Last updated: Tue, 06 Jul 2021 16:35:12 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Jaap Taal.