Skip to content

Commit e196c09

Browse files
committed
Accept prebuilt Query object in connection.query
This allows support code to construct a Query instance to be used with a connection made available in the future.
1 parent 838a56a commit e196c09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Connection.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ Connection.prototype.query = function(sql, values, cb) {
6363

6464
var options = {};
6565

66+
if (sql instanceof Sequences.Query) {
67+
// query(new Sequences.Query(options, cb))
68+
return this._protocol._enqueue(sql);
69+
}
70+
6671
if (typeof sql === 'object') {
6772
// query(options, cb)
6873
options = sql;

0 commit comments

Comments
 (0)