presto-client
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -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 @@ |
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19190
300
214