Skip to content

Commit bd06582

Browse files
committed
query without event emitter
1 parent 099cc6a commit bd06582

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/pg/lib/query.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
'use strict'
22

3-
const { EventEmitter } = require('events')
4-
53
const Result = require('./result')
64
const utils = require('./utils')
75

8-
class Query extends EventEmitter {
6+
class Query {
97
constructor(config, values, callback) {
10-
super()
11-
128
config = utils.normalizeQueryConfig(config, values, callback)
139

1410
this.text = config.text
@@ -93,7 +89,6 @@ class Query extends EventEmitter {
9389
return
9490
}
9591

96-
this.emit('row', row, this._result)
9792
if (this._accumulateRows) {
9893
this._result.addRow(row)
9994
}
@@ -130,7 +125,6 @@ class Query extends EventEmitter {
130125
if (this.callback) {
131126
return this.callback(err)
132127
}
133-
this.emit('error', err)
134128
}
135129

136130
handleReadyForQuery(con) {
@@ -146,7 +140,6 @@ class Query extends EventEmitter {
146140
})
147141
}
148142
}
149-
this.emit('end', this._results)
150143
}
151144

152145
submit(connection) {

0 commit comments

Comments
 (0)