Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

presto-client

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

presto-client - npm Package Compare versions

Comparing version 0.11.2 to 0.12.0

2

lib/presto-client/headers.js

@@ -18,2 +18,3 @@ var Headers = exports.Headers = function(){

Headers.SESSION = 'X-Presto-Session';
Headers.SESSION = 'X-Presto-Prepared-Statement';

@@ -41,2 +42,3 @@ Headers.USER_AGENT = 'User-Agent';

TrinoHeaders.SESSION = 'X-Trino-Session';
TrinoHeaders.PREPARE = 'X-Trino-Prepared-Statement';

@@ -43,0 +45,0 @@ TrinoHeaders.USER_AGENT = 'User-Agent';

26

lib/presto-client/index.js

@@ -80,11 +80,15 @@ const { URL } = require('url') ;

} else {
// "opts" argument should be an URL, probably nextUri
var href = new URL(opts);
opts = {
method: 'GET',
host: href.hostname,
port: href.port || (href.protocol === 'https:' ? '443' : '80'),
path: href.pathname + href.search,
headers: {},
};
try {
// "opts" argument should be an URL, probably nextUri
var href = new URL(opts);
opts = {
method: 'GET',
host: href.hostname,
port: href.port || (href.protocol === 'https:' ? '443' : '80'),
path: href.pathname + href.search,
headers: {},
};
} catch (error) {
return callback(error);
}
}

@@ -202,3 +206,7 @@ opts.protocol = client.protocol;

}
if (opts.prepares) {
header[client.headers.PREPARE] = opts.prepares.map((s, index) => 'query' + index + '=' + urlencode(s)).join(',');
}
if (opts.session)

@@ -205,0 +213,0 @@ header[client.headers.SESSION] = opts.session;

{
"name": "presto-client",
"version": "0.11.2",
"version": "0.12.0",
"description": "Distributed query engine Presto/Trino client library for node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -93,2 +93,5 @@ # presto-client-node

* timezone [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`
* info [boolean :optional]

@@ -95,0 +98,0 @@ * fetch query info (execution statistics) for success callback, or not (default false)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc