File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ var Client = function(config) {
2020 this . connection = config . connection || new Connection ( { stream : config . stream } ) ;
2121 this . queryQueue = [ ] ;
2222 this . password = config . password || defaults . password ;
23+ this . binary = config . binary || defaults . binary ;
2324 this . encoding = 'utf8' ;
2425 this . processID = null ;
2526 this . secretKey = null ;
@@ -173,6 +174,9 @@ p._pulseQueryQueue = function() {
173174p . query = function ( config , values , callback ) {
174175 //can take in strings or config objects
175176 config = ( typeof ( config ) == 'string' ) ? { text : config } : config ;
177+ if ( this . binary && ! ( 'binary' in config ) ) {
178+ config . binary = true ;
179+ }
176180
177181 if ( values ) {
178182 if ( typeof values === 'function' ) {
Original file line number Diff line number Diff line change @@ -14,5 +14,7 @@ module.exports = {
1414 //0 will disable connection pooling
1515 poolSize : 10 ,
1616 //duration of node-pool timeout
17- poolIdleTimeout : 30000
17+ poolIdleTimeout : 30000 ,
18+ // binary result mode
19+ binary : false
1820}
You can’t perform that action at this time.
0 commit comments