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.1.1 to 0.1.2

2

lib/presto-client/headers.js

@@ -15,2 +15,4 @@ var Headers = exports.Headers = function(){

Headers.SESSION = 'X-Presto-Session';
Headers.USER_AGENT = 'User-Agent';

@@ -144,2 +144,5 @@ var http = require('http');

if (opts.session)
header[Headers.SESSION] = opts.session;
var req = { method: 'POST', path: '/v1/execute', headers: header, body: query };

@@ -172,2 +175,5 @@ client.request(req, function(err, code, content){

if (opts.session)
header[Headers.SESSION] = opts.session;
var fetch_info = opts.info || false;

@@ -174,0 +180,0 @@

2

package.json
{
"name": "presto-client",
"version": "0.1.1",
"version": "0.1.2",
"description": "Distributed query engine Presto client library for node.js",

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

@@ -8,3 +8,3 @@ # presto-client-node

var client = new presto.Client({user: 'myname', catalog: 'hive', schema: 'default'});
client.execute('show schemas', function(error, data, columns){

@@ -19,3 +19,3 @@ console.log({databases: data});

var client = new presto.Client({user: 'myname'});
client.execute({

@@ -82,2 +82,4 @@ query: 'SELECT count(*) as cnt FROM tblname WHERE ...',

* schema string (default: intance default schema)
* session [string]
* set session variables via the [X-Presto-Session header](https://stackoverflow.com/questions/37082016/how-to-manage-presto-query-session-variables-using-rest-api) - string should have form `key1=val1,key2=val2`
* callback [function(error, data, columns)]

@@ -185,2 +187,4 @@ * called once when query finished

* 0.1.2:
* add X-Presto-Session if "session" specified
* 0.1.1:

@@ -187,0 +191,0 @@ * fix bug not to handle HTTP level errors correctly

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