Comparing version
# Change Log | ||
## node-oracledb v2.3.0 (7 Jun 2018) | ||
- The stated compatibility is now for Node.js 6, 8, and 10 due to EOL | ||
of Node.js 4, and the release of Node 10. | ||
- Added support for heterogeneous connection pooling and for proxy | ||
support in connection pools. This allows each connection in the | ||
pool to use different database credentials. | ||
- Added support for Oracle Database Continuous Query Notifications, | ||
allowing JavaScript methods to be called when database changes are | ||
committed. | ||
- Added support to `fetchAsString` and `fetchInfo` for fetching RAW | ||
columns as STRING (hex-encoded). | ||
- Added Windows support for building binary packages for self-hosting | ||
on internal networks. PR #891 (Danilo Silva). | ||
- Eliminated a memory leak when binding LOBs as `oracledb.BIND_INOUT`. | ||
- Added an error message indicating that `batchErrors` and | ||
`dmlRowCounts` can only be used with INSERT, UPDATE, DELETE and | ||
MERGE statements. | ||
- Fixed a bug that caused `queryStream()` to emit multiple close | ||
events in Node.js 10. | ||
- Fixed a crash when getting the list of names for an undefined object | ||
with Node.js 6. | ||
- Remove deprecated `Buffer()` function in tests in order to eliminate | ||
a deprecation warning with Node.js 10. | ||
- Upgraded NAN dependency from 2.8 to 2.10. | ||
- Made some internal changes to fix NAN 2.10 deprecations: Replaced | ||
`v8::String::Utf8Value` with `Nan::Uft8String`. Replaced | ||
`MakeCallback()` with `runInAsyncScope()`. | ||
- Mention that `queueRequests` is deprecated and will be removed in a | ||
future version; connection pool queuing will always be enabled in | ||
that future version. | ||
## node-oracledb v2.2.0 (3 Apr 2018) | ||
@@ -4,0 +48,0 @@ |
@@ -35,2 +35,4 @@ /* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. */ | ||
var pingPromisified; | ||
var subscribePromisified; | ||
var unsubscribePromisified; | ||
@@ -325,2 +327,30 @@ // The queryStream function is similar to execute except that it immediately | ||
// create a subscription which can be used to get notifications of database | ||
// changes | ||
function subscribe(name, options, subscribeCb) { | ||
var self = this; | ||
nodbUtil.assert(arguments.length == 3, 'NJS-009'); | ||
nodbUtil.assert(typeof name === 'string', 'NJS-006', 1); | ||
nodbUtil.assert(nodbUtil.isObject(options), 'NJS-006', 2); | ||
nodbUtil.assert(typeof subscribeCb === 'function', 'NJS-006', 3); | ||
self._subscribe.call(self, name, options, subscribeCb); | ||
} | ||
subscribePromisified = nodbUtil.promisify(subscribe); | ||
// destroy a subscription which was earlier created using subscribe() | ||
function unsubscribe(name, cb) { | ||
var self = this; | ||
nodbUtil.assert(arguments.length == 2, 'NJS-009'); | ||
nodbUtil.assert(typeof name === 'string', 'NJS-006', 1); | ||
nodbUtil.assert(typeof cb === 'function', 'NJS-006', 2); | ||
self._unsubscribe.call(self, name, cb); | ||
} | ||
unsubscribePromisified = nodbUtil.promisify(unsubscribe); | ||
// The extend method is used to extend the Connection instance from the C layer with | ||
@@ -432,2 +462,18 @@ // custom properties and method overrides. References to the original methods are | ||
writable: true | ||
}, | ||
_subscribe: { | ||
value: conn.subscribe | ||
}, | ||
subscribe: { | ||
value: subscribePromisified, | ||
enumerable: true, | ||
writable: true | ||
}, | ||
_unsubscribe: { | ||
value: conn.unsubscribe | ||
}, | ||
unsubscribe: { | ||
value: unsubscribePromisified, | ||
enumerable: true, | ||
writable: true | ||
} | ||
@@ -434,0 +480,0 @@ } |
@@ -327,2 +327,30 @@ /* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */ | ||
}, | ||
CQN_OPCODE_ALL_OPS: { | ||
value: 0, | ||
enumerable: true | ||
}, | ||
CQN_OPCODE_ALL_ROWS: { | ||
value: 1, | ||
enumerable: true | ||
}, | ||
CQN_OPCODE_ALTER: { | ||
value: 16, | ||
enumerable: true | ||
}, | ||
CQN_OPCODE_DELETE: { | ||
value: 8, | ||
enumerable: true | ||
}, | ||
CQN_OPCODE_DROP: { | ||
value: 32, | ||
enumerable: true | ||
}, | ||
CQN_OPCODE_INSERT: { | ||
value: 2, | ||
enumerable: true | ||
}, | ||
CQN_OPCODE_UPDATE: { | ||
value: 4, | ||
enumerable: true | ||
}, | ||
DB_TYPE_VARCHAR: { | ||
@@ -464,2 +492,58 @@ value: 1, | ||
}, | ||
SUBSCR_EVENT_TYPE_DEREG: { | ||
value: 5, | ||
enumerable: true | ||
}, | ||
SUBSCR_EVENT_TYPE_OBJ_CHANGE: { | ||
value: 6, | ||
enumerable: true | ||
}, | ||
SUBSCR_EVENT_TYPE_QUERY_CHANGE: { | ||
value: 7, | ||
enumerable: true | ||
}, | ||
SUBSCR_EVENT_TYPE_AQ: { | ||
value: 100, | ||
enumerable: true | ||
}, | ||
SUBSCR_GROUPING_CLASS_TIME: { | ||
value: 1, | ||
enumerable: true | ||
}, | ||
SUBSCR_GROUPING_TYPE_SUMMARY: { | ||
value: 1, | ||
enumerable: true | ||
}, | ||
SUBSCR_GROUPING_TYPE_LAST: { | ||
value: 2, | ||
enumerable: true | ||
}, | ||
SUBSCR_NAMESPACE_AQ: { | ||
value: 1, | ||
enumerable: true | ||
}, | ||
SUBSCR_NAMESPACE_DBCHANGE: { | ||
value: 2, | ||
enumerable: true | ||
}, | ||
SUBSCR_QOS_BEST_EFFORT: { | ||
value: 16, | ||
enumerable: true | ||
}, | ||
SUBSCR_QOS_DEREG_NFY: { | ||
value: 2, | ||
enumerable: true | ||
}, | ||
SUBSCR_QOS_QUERY: { | ||
value: 8, | ||
enumerable: true | ||
}, | ||
SUBSCR_QOS_RELIABLE: { | ||
value: 1, | ||
enumerable: true | ||
}, | ||
SUBSCR_QOS_ROWIDS: { | ||
value: 4, | ||
enumerable: true | ||
}, | ||
NUMBER: { | ||
@@ -466,0 +550,0 @@ value: 2002, |
@@ -30,3 +30,3 @@ /* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ | ||
// getConnection and checkRequestQueue constently. | ||
function completeConnectionRequest(getConnectionCb) { | ||
function completeConnectionRequest(config, getConnectionCb) { | ||
var self = this; | ||
@@ -38,3 +38,3 @@ | ||
self._getConnection(function(err, connInst) { | ||
self._getConnection(config, function(err, connInst) { | ||
if (err) { | ||
@@ -103,3 +103,4 @@ // Decrementing _connectionsOut if we didn't actually get a connection | ||
completeConnectionRequest.call(self, payload.getConnectionCb); | ||
completeConnectionRequest.call(self, payload.config, | ||
payload.getConnectionCb); | ||
} | ||
@@ -135,3 +136,3 @@ | ||
// Otherwise the request will be queued and completed when a connection is avaialble. | ||
function getConnection(getConnectionCb) { | ||
function getConnection(a1, a2) { | ||
var self = this; | ||
@@ -141,6 +142,15 @@ var payload; | ||
var timerIdx; | ||
var getConnectionCb = arguments[arguments.length - 1]; | ||
var options = {}; | ||
nodbUtil.assert(arguments.length === 1, 'NJS-009'); | ||
nodbUtil.assert(typeof getConnectionCb === 'function', 'NJS-006', 1); | ||
nodbUtil.assert(arguments.length >= 1 && arguments.length <= 2, 'NJS-009'); | ||
nodbUtil.assert(typeof getConnectionCb === 'function', 'NJS-006', | ||
arguments.length); | ||
// Optional JSON parameter | ||
if (arguments.length > 1 ) { | ||
options = arguments[0]; | ||
nodbUtil.assert(nodbUtil.isObject(options), 'NJS-006', 1 ); | ||
} | ||
// Added this check because if the pool isn't valid and we reference self.poolMax | ||
@@ -162,3 +172,3 @@ // (which is a C layer getter) an error will be thrown. | ||
if (self.queueRequests === false) { // queueing is disabled for pool | ||
self._getConnection(function(err, connInst) { | ||
self._getConnection(options, function(err, connInst) { | ||
if (err) { | ||
@@ -179,3 +189,3 @@ if (self._enableStats) { | ||
} else if (self._connectionsOut < self.poolMax) { // queueing enabled, but not needed | ||
completeConnectionRequest.call(self, getConnectionCb); | ||
completeConnectionRequest.call(self, options, getConnectionCb); | ||
} else { // need to queue the request | ||
@@ -197,3 +207,4 @@ if (self._usingQueueTimeout) { | ||
timeoutHandle: timeoutHandle, | ||
getConnectionCb: getConnectionCb | ||
getConnectionCb: getConnectionCb, | ||
config : options | ||
}; | ||
@@ -200,0 +211,0 @@ |
@@ -51,3 +51,4 @@ /* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */ | ||
Readable.call(self, { | ||
objectMode: true | ||
objectMode: true, | ||
emitClose: false // Prevents duplicate close events | ||
}); | ||
@@ -54,0 +55,0 @@ |
@@ -1,1 +0,1 @@ | ||
57c1f83a4343c4db029b9df327b50deae3c9cf2c Thu 29 Mar 2018 08:05:42 UTC | ||
88e5d8dd1201e3d0244e8264cf1d0652b2be378e Tue 5 Jun 2018 07:13:28 UTC |
@@ -1,2 +0,2 @@ | ||
# ODPI-C version 2.3 | ||
# ODPI-C version 2.4 | ||
@@ -42,3 +42,3 @@ Oracle Database Programming Interface for C (ODPI-C) is an open source library | ||
* [cx_Oracle](https://oracle.github.io/python-cx_Oracle) Python interface. | ||
* [node-oracledb](https://github.com/oracle/node-oracledb/tree/dev-2.0) Node.js module. | ||
* [node-oracledb](https://oracle.github.io/node-oracledb) Node.js module. | ||
@@ -45,0 +45,0 @@ Third-party Drivers: |
{ | ||
"name": "oracledb", | ||
"version": "2.2.0", | ||
"description": "Oracle Database driver by Oracle Corp.", | ||
"version": "2.3.0", | ||
"description": "A Node.js module for Oracle Database access", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "homepage": "http://oracle.github.io/node-oracledb/", |
@@ -346,3 +346,3 @@ /* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. */ | ||
packageUtil.error('Pre-built binary packages are not available for architecture="' + process.arch + '"'); | ||
} else if (['46', '48', '57', '59'].indexOf(process.versions.modules) < 0) { | ||
} else if (['48', '57', '64'].indexOf(process.versions.modules) < 0) { | ||
packageUtil.error('Pre-built binary packages are not available for this version of Node.js (NODE_MODULE_VERSION="' + process.versions.modules + '")'); | ||
@@ -349,0 +349,0 @@ } |
{ | ||
"name": "oracledb", | ||
"version": "2.2.0", | ||
"description": "Oracle Database driver by Oracle Corp.", | ||
"version": "2.3.0", | ||
"description": "A Node.js module for Oracle Database access", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "homepage": "http://oracle.github.io/node-oracledb/", |
@@ -79,3 +79,3 @@ # Overview | ||
- `oracledb-src-X.Y.Z.tgz` which is the complete source code, mainly | ||
created because older npm's (e.g. with Node 4) do not download the | ||
created because older npm's (e.g. with Node.js 4) do not download the | ||
opdi submodule code when installing from a GitHub tag or branch. | ||
@@ -102,2 +102,5 @@ | ||
- On Windows, MAKEPKG.BAT has command options to create binaries, and | ||
also to create staged binaries and the main packages. | ||
- At install time, setting the environment variable | ||
@@ -113,2 +116,3 @@ `NODE_ORACLEDB_TRACE_INSTALL` to `TRUE` will cause `npm install` to | ||
- oracledbinstall.js should cache SHASUMS256.txt so it doesn't have to be fetched twice. | ||
- Add support for proxies that require authentication | ||
- Improve oracledbinstall.js `no_proxy` support for domain names and wildcards. |
@@ -1,2 +0,2 @@ | ||
# node-oracledb version 2.2 | ||
# node-oracledb version 2.3 | ||
@@ -6,3 +6,3 @@ The node-oracledb add-on for Node.js powers high performance Oracle | ||
Use node-oracledb to connect Node.js 4, 6, 8 and 9 to Oracle Database. | ||
Use node-oracledb to connect Node.js 6, 8 and 10 to Oracle Database. | ||
@@ -9,0 +9,0 @@ Node-oracledb supports basic and advanced features of Oracle Database |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1319404
4.55%71
2.9%2897
4.81%