Accept anything with function 'submit' as a query
This allows for passing in custom objects which conform to the query API
This commit is contained in:
parent
a72bd5cb3c
commit
894c60e605
@ -284,7 +284,7 @@ Client.prototype.copyTo = function (text) {
|
|||||||
|
|
||||||
Client.prototype.query = function(config, values, callback) {
|
Client.prototype.query = function(config, values, callback) {
|
||||||
//can take in strings, config object or query object
|
//can take in strings, config object or query object
|
||||||
var query = (config instanceof Query) ? config :
|
var query = (typeof config.submit == 'function') ? config :
|
||||||
new Query(config, values, callback);
|
new Query(config, values, callback);
|
||||||
if(this.binary && !query.binary) {
|
if(this.binary && !query.binary) {
|
||||||
query.binary = true;
|
query.binary = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user