From 93c465339846bed8f4e94465d243f8de5be24c0c Mon Sep 17 00:00:00 2001 From: James Munro Date: Fri, 16 Mar 2018 17:21:45 +0000 Subject: [PATCH] Added values to the QueryOptions. --- types/mysql/index.d.ts | 5 +++++ types/mysql/mysql-tests.ts | 3 +++ 2 files changed, 8 insertions(+) diff --git a/types/mysql/index.d.ts b/types/mysql/index.d.ts index 1e827a7d37..d888add7c5 100644 --- a/types/mysql/index.d.ts +++ b/types/mysql/index.d.ts @@ -240,6 +240,11 @@ export interface QueryOptions { */ sql: string; + /** + * Values for template query + */ + values: any; + /** * Every operation takes an optional inactivity timeout option. This allows you to specify appropriate timeouts for * operations. It is important to note that these timeouts are not part of the MySQL protocol, and rather timeout diff --git a/types/mysql/mysql-tests.ts b/types/mysql/mysql-tests.ts index a3ddb27248..480e7e0275 100644 --- a/types/mysql/mysql-tests.ts +++ b/types/mysql/mysql-tests.ts @@ -423,6 +423,9 @@ connection.query({ } }); +connection.query({sql: '...', values: ['test']}, (err: Error, results: any) => { +}); + connection = mysql.createConnection("mysql://localhost/test?flags=-FOUND_ROWS"); connection = mysql.createConnection({debug: true}); connection = mysql.createConnection({debug: ['ComQueryPacket', 'RowDataPacket']});