pg 8.11.5 → 8.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/native/query.js +3 -0
- package/lib/query.js +5 -0
- package/package.json +3 -3
package/lib/native/query.js
CHANGED
|
@@ -10,6 +10,7 @@ var NativeQuery = (module.exports = function (config, values, callback) {
|
|
|
10
10
|
this.text = config.text
|
|
11
11
|
this.values = config.values
|
|
12
12
|
this.name = config.name
|
|
13
|
+
this.queryMode = config.queryMode
|
|
13
14
|
this.callback = config.callback
|
|
14
15
|
this.state = 'new'
|
|
15
16
|
this._arrayMode = config.rowMode === 'array'
|
|
@@ -159,6 +160,8 @@ NativeQuery.prototype.submit = function (client) {
|
|
|
159
160
|
}
|
|
160
161
|
var vals = this.values.map(utils.prepareValue)
|
|
161
162
|
client.native.query(this.text, vals, after)
|
|
163
|
+
} else if (this.queryMode === 'extended') {
|
|
164
|
+
client.native.query(this.text, [], after)
|
|
162
165
|
} else {
|
|
163
166
|
client.native.query(this.text, after)
|
|
164
167
|
}
|
package/lib/query.js
CHANGED
|
@@ -16,6 +16,7 @@ class Query extends EventEmitter {
|
|
|
16
16
|
this.rows = config.rows
|
|
17
17
|
this.types = config.types
|
|
18
18
|
this.name = config.name
|
|
19
|
+
this.queryMode = config.queryMode
|
|
19
20
|
this.binary = config.binary
|
|
20
21
|
// use unique portal name each time
|
|
21
22
|
this.portal = config.portal || ''
|
|
@@ -32,6 +33,10 @@ class Query extends EventEmitter {
|
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
requiresPreparation() {
|
|
36
|
+
if (this.queryMode === 'extended') {
|
|
37
|
+
return true
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
// named queries must always be prepared
|
|
36
41
|
if (this.name) {
|
|
37
42
|
return true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.12.0",
|
|
4
4
|
"description": "PostgreSQL client - pure javascript & libpq with the same API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"database",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"pg-copy-streams": "0.3.0",
|
|
35
35
|
"typescript": "^4.0.3",
|
|
36
36
|
"workerd": "^1.20230419.0",
|
|
37
|
-
"wrangler": "
|
|
37
|
+
"wrangler": "3.58.0"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
40
|
"pg-cloudflare": "^1.1.1"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 8.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "0f42880861951970e193d31359508d460a67d25a"
|
|
62
62
|
}
|