mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Fix test
This commit is contained in:
parent
0a1052516f
commit
1200da5c74
6
index.js
6
index.js
@ -9,7 +9,7 @@ var nextUniqueID = 1 // concept borrowed from org.postgresql.core.v3.QueryExecut
|
||||
function Cursor (text, values, config) {
|
||||
EventEmitter.call(this)
|
||||
|
||||
this._conf = config || { }
|
||||
this._conf = config || {}
|
||||
this.text = text
|
||||
this.values = values ? values.map(prepare) : null
|
||||
this.connection = null
|
||||
@ -148,7 +148,7 @@ Cursor.prototype.end = function (cb) {
|
||||
if (this.state !== 'initialized') {
|
||||
this.connection.sync()
|
||||
}
|
||||
this.connection.stream.once('end', cb)
|
||||
this.connection.once('end', cb)
|
||||
this.connection.end()
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ Cursor.prototype.close = function (cb) {
|
||||
if (this.state === 'done') {
|
||||
return setImmediate(cb)
|
||||
}
|
||||
this.connection.close({type: 'P'})
|
||||
this.connection.close({ type: 'P' })
|
||||
this.connection.sync()
|
||||
this.state = 'done'
|
||||
if (cb) {
|
||||
|
||||
1807
package-lock.json
generated
Normal file
1807
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user