presto-client
Advanced tools
Comparing version 0.8.1 to 0.9.0
@@ -171,6 +171,5 @@ const { URL } = require('url') ; | ||
if (!opts.catalog && !this.catalog) | ||
throw {message: "catalog not specified"}; | ||
if (!opts.schema && !this.schema) | ||
throw {message: "schema not specified"}; | ||
if ((opts.schema || this.schema) && !(opts.catalog || this.catalog)) { | ||
throw {message: "Catalog not specified; catalog is required if schema is specified"} | ||
} | ||
if (!opts.success && !opts.callback) | ||
@@ -180,4 +179,8 @@ throw {message: "callback function 'success' (or 'callback') not specified"}; | ||
var header = {}; | ||
header[Headers.CATALOG] = opts.catalog || this.catalog; | ||
header[Headers.SCHEMA] = opts.schema || this.schema; | ||
if (opts.catalog || this.catalog) { | ||
header[Headers.CATALOG] = opts.catalog || this.catalog; | ||
} | ||
if (opts.schema || this.schema) { | ||
header[Headers.SCHEMA] = opts.schema || this.schema; | ||
} | ||
@@ -184,0 +187,0 @@ if (opts.session) |
{ | ||
"name": "presto-client", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"description": "Distributed query engine Presto client library for node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -28,3 +28,3 @@ # presto-client-node | ||
Or add `presto-client` to your own `packagen.json`, and do `npm install`. | ||
Or add `presto-client` to your own `package.json`, and do `npm install`. | ||
@@ -170,2 +170,4 @@ ## API | ||
* 0.9.0: | ||
* make "catalog" and "schema" options optional (need to specify those in queries if omitted) | ||
* 0.8.1: | ||
@@ -172,0 +174,0 @@ * fix to specify default ports of http/https if nextUri doesn't have ports |
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
23269
330
219