MCPcopy Index your code
hub / github.com/brianc/node-postgres / constructor

Method constructor

packages/pg/lib/query.js:9–33  ·  view source on GitHub ↗
(config, values, callback)

Source from the content-addressed store, hash-verified

7
8class Query extends EventEmitter {
9 constructor(config, values, callback) {
10 super()
11
12 config = utils.normalizeQueryConfig(config, values, callback)
13
14 this.text = config.text
15 this.values = config.values
16 this.rows = config.rows
17 this.types = config.types
18 this.name = config.name
19 this.queryMode = config.queryMode
20 this.binary = config.binary
21 // use unique portal name each time
22 this.portal = config.portal || ''
23 this.callback = config.callback
24 this._rowMode = config.rowMode
25 if (process.domain && config.callback) {
26 this.callback = process.domain.bind(config.callback)
27 }
28 this._result = new Result(this._rowMode, this.types)
29
30 // potential for multiple results
31 this._results = this._result
32 this._canceledDueToError = false
33 }
34
35 requiresPreparation() {
36 if (this.queryMode === 'extended') {

Callers

nothing calls this directly

Calls 1

bindMethod · 0.80

Tested by

no test coverage detected