mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Add sqlstring.raw to sqlstring type definitions.
This commit is contained in:
Vendored
+1
@@ -7,3 +7,4 @@
|
||||
export function format(sql: string, args: object | any[]): string;
|
||||
export function escape(value: any): string;
|
||||
export function escapeId(value: any, dotQualifier?: boolean): string;
|
||||
export function raw(sql: string): { toSqlString: () => string };
|
||||
|
||||
@@ -29,3 +29,10 @@ const sql6 =
|
||||
const userId4 = 1;
|
||||
const inserts = ["users", "id", userId4];
|
||||
const sql7 = SqlString.format("SELECT * FROM ?? WHERE ?? = ?", inserts);
|
||||
|
||||
const userId4 = 1;
|
||||
const inserts = ["users", "id", userId4];
|
||||
const sql7 = SqlString.format("SELECT * FROM ?? WHERE ?? = ?", inserts);
|
||||
|
||||
var CURRENT_TIMESTAMP = SqlString.raw('CURRENT_TIMESTAMP()');
|
||||
const sql8 = SqlString.format('UPDATE posts SET modified = ? WHERE id = ?', [CURRENT_TIMESTAMP, 42]);
|
||||
|
||||
Reference in New Issue
Block a user