Update QueryBuilder
This commit is contained in:
parent
0ee092abd9
commit
b13ad2a23d
@ -20,12 +20,11 @@ class QueryBuilder extends QueryBuilderBase {
|
|||||||
* Run an arbitrary sql query. Run as a prepared statement.
|
* Run an arbitrary sql query. Run as a prepared statement.
|
||||||
*
|
*
|
||||||
* @param {string} sql - The sql to execute
|
* @param {string} sql - The sql to execute
|
||||||
* @param {array} [params] - The query parameters
|
* @param {Array} [params] - The query parameters
|
||||||
* @param {function} [callback] - Optional callback
|
* @return {Promise} - Promise with result of query
|
||||||
* @return {Promise} - Returns a promise if no callback is supplied
|
|
||||||
*/
|
*/
|
||||||
query (string, params) {
|
query (sql, params) {
|
||||||
return this.adapter.execute(string, params);
|
return this.adapter.execute(sql, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,7 +15,7 @@ module.exports = function promiseTestRunner (qb) {
|
|||||||
suite(suiteName, () => {
|
suite(suiteName, () => {
|
||||||
let currentSuite = tests[suiteName];
|
let currentSuite = tests[suiteName];
|
||||||
Object.keys(currentSuite).forEach(testDesc => {
|
Object.keys(currentSuite).forEach(testDesc => {
|
||||||
test(`Promise - ${testDesc}`, () => {
|
test(testDesc, () => {
|
||||||
const methodObj = currentSuite[testDesc];
|
const methodObj = currentSuite[testDesc];
|
||||||
const methodNames = Object.keys(methodObj);
|
const methodNames = Object.keys(methodObj);
|
||||||
let results = [];
|
let results = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user