presto-client
Advanced tools
Comparing version 0.12.1 to 0.12.2
@@ -18,3 +18,3 @@ var Headers = exports.Headers = function(){ | ||
Headers.SESSION = 'X-Presto-Session'; | ||
Headers.SESSION = 'X-Presto-Prepared-Statement'; | ||
Headers.PREPARE = 'X-Presto-Prepared-Statement'; | ||
@@ -21,0 +21,0 @@ Headers.USER_AGENT = 'User-Agent'; |
@@ -208,6 +208,5 @@ const { URL } = require('url') ; | ||
if (opts.prepares) { | ||
header[client.headers.PREPARE] = opts.prepares.map((s, index) => 'query' + index + '=' + urlencode(s)).join(','); | ||
header[client.headers.PREPARE] = opts.prepares.map((s, index) => 'query' + index + '=' + encodeURIComponent(s)).join(','); | ||
} | ||
if (opts.session) | ||
@@ -214,0 +213,0 @@ header[client.headers.SESSION] = opts.session; |
{ | ||
"name": "presto-client", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"description": "Distributed query engine Presto/Trino client library for node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -94,5 +94,8 @@ # presto-client-node | ||
* user [string :optional] | ||
* prepares [array(string)] | ||
* The array of prepared queries | ||
* Prepared queries can be referred as `queryN`(N: index) like `query0`, `query1` in the query specified as `query` | ||
* prepares [array(string) :optional] | ||
* The array of prepared statements, without `PREPARE query0 FROM` prefix. | ||
* Prepared queries can be referred as `queryN`(N: index) like `query0`, `query1` in the query specified as `query`. Example: | ||
```javascript | ||
client.execute({ query: 'EXECUTE query0 USING 2', prepares: ['SELECT 2 + ?'], /* ... */ }); | ||
``` | ||
* info [boolean :optional] | ||
@@ -181,2 +184,4 @@ * fetch query info (execution statistics) for success callback, or not (default false) | ||
* 0.12.2: | ||
* fix the bug of the "prepares" option | ||
* 0.12.1: | ||
@@ -183,0 +188,0 @@ * add "user" option on execute() to override the user specified per client |
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
26071
248
3