File tree Expand file tree Collapse file tree 2 files changed +1810
-3
lines changed Expand file tree Collapse file tree 2 files changed +1810
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ var nextUniqueID = 1 // concept borrowed from org.postgresql.core.v3.QueryExecut
9
9
function Cursor ( text , values , config ) {
10
10
EventEmitter . call ( this )
11
11
12
- this . _conf = config || { }
12
+ this . _conf = config || { }
13
13
this . text = text
14
14
this . values = values ? values . map ( prepare ) : null
15
15
this . connection = null
@@ -148,15 +148,15 @@ Cursor.prototype.end = function (cb) {
148
148
if ( this . state !== 'initialized' ) {
149
149
this . connection . sync ( )
150
150
}
151
- this . connection . stream . once ( 'end' , cb )
151
+ this . connection . once ( 'end' , cb )
152
152
this . connection . end ( )
153
153
}
154
154
155
155
Cursor . prototype . close = function ( cb ) {
156
156
if ( this . state === 'done' ) {
157
157
return setImmediate ( cb )
158
158
}
159
- this . connection . close ( { type : 'P' } )
159
+ this . connection . close ( { type : 'P' } )
160
160
this . connection . sync ( )
161
161
this . state = 'done'
162
162
if ( cb ) {
You can’t perform that action at this time.
0 commit comments