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

oracledb

Package Overview
Dependencies
Maintainers
4
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oracledb - npm Package Compare versions

Comparing version 6.5.0 to 6.5.1

build/Release/oracledb-6.5.1-darwin-x64.node

2

examples/README.md

@@ -133,3 +133,5 @@ # Node-oracledb Examples

[`typehandlernum.js`](typehandlernum.js) | Show how a type handler can alter queried numbers
[`vectortype1.js`](vectortype1.js) | Insert and query VECTOR columns.
[`vectortype2.js`](vectortype2.js) | Insert data into VECTOR columns and verify vector operations.
[`version.js`](version.js) | Shows the node-oracledb version attributes
[`webapp.js`](webapp.js) | A simple web application using a connection pool

@@ -34,2 +34,13 @@ // Copyright (c) 2022, 2024, Oracle and/or its affiliates.

const ERR_INTEGRITY_ERROR_CODES = [
1, // unique constraint violated
1400, // cannot insert NULL
1438, // value larger than specified precision
2290, // check constraint violated
2291, // integrity constraint violated - parent key not found
2292, // integrity constraint violated - child record found
21525, // attribute or collection element violated its constraints
40479, // internal JSON serializer error
];
// define error number constants (used in JavaScript library)

@@ -699,2 +710,3 @@ const ERR_INVALID_POOL = 2;

module.exports = {
ERR_INTEGRITY_ERROR_CODES,
ERR_INVALID_POOL,

@@ -701,0 +713,0 @@ ERR_INVALID_CONNECTION,

4

lib/impl/datahandlers/buffer.js

@@ -846,4 +846,4 @@ // Copyright (c) 2022, 2024, Oracle and/or its affiliates.

// throw exception if number cannot be represented as an Oracle Number
if (value.length > constants.NUMBER_MAX_DIGITS || exponent > 126 ||
exponent < -129) {
if (value.length > constants.NUMBER_MAX_DIGITS || exponent >= 126 ||
exponent <= -131) {
errors.throwErr(errors.ERR_ORACLE_NUMBER_NO_REPR);

@@ -850,0 +850,0 @@ }

@@ -121,29 +121,2 @@ // Copyright (c) 2015, 2023, Oracle and/or its affiliates.

//---------------------------------------------------------------------------
// _isPrivilege()
//
// Returns a boolean indicating if the supplied value is a valid privilege.
//---------------------------------------------------------------------------
function _isPrivilege(value) {
// Privileges are mutually exclusive and cannot be specified together
// except SYSPRELIM, which cannot be specified alone, it is specified in a
// combo with SYSOPER or SYSDBA. SYSPRELIM is used only for
// startup/shutdown
// If SYSPRELIM specified, clear the bit
if (value & constants.SYSPRELIM) {
value = value ^ constants.SYSPRELIM;
}
return (
value === constants.SYSASM ||
value === constants.SYSBACKUP ||
value === constants.SYSDBA ||
value === constants.SYSDG ||
value === constants.SYSKM ||
value === constants.SYSOPER ||
value === constants.SYSRAC
);
}
//-----------------------------------------------------------------------------

@@ -335,2 +308,9 @@ // _verifyOptions()

// privilege must be one of a set of named constants
if (options.privilege !== undefined) {
errors.assertParamPropValue(nodbUtil.isPrivilege(options.privilege), 1,
"privilege");
outOptions.privilege = options.privilege;
}
// check pool specific options

@@ -449,9 +429,2 @@ if (inCreatePool) {

// privilege must be one of a set of named constants
if (options.privilege !== undefined) {
errors.assertParamPropValue(_isPrivilege(options.privilege), 1,
"privilege");
outOptions.privilege = options.privilege;
}
// shardingKey must be an array of values

@@ -458,0 +431,0 @@ if (options.shardingKey !== undefined) {

@@ -241,2 +241,9 @@ // Copyright (c) 2016, 2024, Oracle and/or its affiliates.

// privilege must be one of a set of named constants
if (options.privilege !== undefined) {
errors.assertParamPropValue(nodbUtil.isPrivilege(options.privilege), 1,
"privilege");
outOptions.privilege = options.privilege;
}
return outOptions;

@@ -243,0 +250,0 @@ }

@@ -727,2 +727,3 @@ // Copyright (c) 2022, 2024, Oracle and/or its affiliates.

// errors
TNS_ERR_INCONSISTENT_DATA_TYPES: 932,
TNS_ERR_VAR_NOT_IN_SELECT_LIST: 1007,

@@ -729,0 +730,0 @@ TNS_ERR_INBAND_MESSAGE: 12573,

@@ -116,5 +116,14 @@ // Copyright (c) 2022, 2024, Oracle and/or its affiliates.

this.statement.moreRowsToFetch = false;
} else if (this.retry) {
this.retry = false;
} else if (this.statement.isQuery &&
(this.errorInfo.num === constants.TNS_ERR_VAR_NOT_IN_SELECT_LIST
|| this.errorInfo.num === constants.TNS_ERR_INCONSISTENT_DATA_TYPES)) {
this.retry = true;
this.connection.statementCache.clearCursor(this.statement);
} else if (this.errorInfo.num !== 0 && this.errorInfo.cursorId !== 0) {
this.connection.statementCache._cachedStatements.delete(this.statement.sql);
this.statement.returnToCache = false;
if (!errors.ERR_INTEGRITY_ERROR_CODES.includes(this.errorInfo.num)) {
this.connection.statementCache.clearCursor(this.statement);
this.statement.returnToCache = false;
}
}

@@ -121,0 +130,0 @@ if (this.errorInfo.batchErrors) {

@@ -177,2 +177,6 @@ // Copyright (c) 2022, 2024, Oracle and/or its affiliates.

}
if (message.retry) {
message.errorOccurred = false;
return await this._processMessage(message);
}
let err = new Error(message.errorInfo.message);

@@ -179,0 +183,0 @@ err.offset = message.errorInfo.pos;

@@ -299,4 +299,6 @@ // Copyright (c) 2022, 2023, Oracle and/or its affiliates.

this.len = constants.NSPMKDAT + 1; /* Packet length */
this.buf = Buffer.allocUnsafe(constants.NSPMKDAT + 1); /* Packet Buffer */
// Packet Buffer
this.buf = Buffer.allocUnsafe(constants.NSPMKDAT + 1).fill(0);
if (isLargeSDU) {

@@ -303,0 +305,0 @@ this.buf.writeUInt32BE(this.len, constants.NSPHDLEN);

@@ -32,2 +32,3 @@ // Copyright (c) 2022, 2024, Oracle and/or its affiliates.

const errors = require('../errors');
const protoConstants = require('./protocol/constants');

@@ -523,2 +524,5 @@ /**

_setVariable(bindInfo, variable) {
if (variable.type._oraTypeNum === protoConstants.TNS_DATA_TYPE_CURSOR) {
this.requiresFullExecute = true;
}
if (variable.maxSize !== bindInfo.maxSize

@@ -525,0 +529,0 @@ || variable.dir !== bindInfo.dir

@@ -149,2 +149,7 @@ // Copyright (c) 2024, Oracle and/or its affiliates.

clearCursor(statement) {
this._addCursorToClose(statement);
statement.cursorId = 0;
}
//---------------------------------------------------------------------------

@@ -151,0 +156,0 @@ // returnStatement()

@@ -34,2 +34,3 @@ // Copyright (c) 2016, 2023, Oracle and/or its affiliates.

const types = require('./types.js');
const constants = require('./constants.js');

@@ -228,2 +229,28 @@ // node-oracledb version number

//---------------------------------------------------------------------------
// isPrivilege()
//
// Returns a boolean indicating if the supplied value is a valid privilege.
//---------------------------------------------------------------------------
function isPrivilege(value) {
// Privileges are mutually exclusive and cannot be specified together
// except SYSPRELIM, which cannot be specified alone, it is specified in a
// combo with SYSOPER or SYSDBA. SYSPRELIM is used only for
// startup/shutdown
// If SYSPRELIM specified, clear the bit
if (value & constants.SYSPRELIM) {
value = value ^ constants.SYSPRELIM;
}
return (
value === constants.SYSASM ||
value === constants.SYSBACKUP ||
value === constants.SYSDBA ||
value === constants.SYSDG ||
value === constants.SYSKM ||
value === constants.SYSOPER ||
value === constants.SYSRAC
);
}
function isShardingKey(value) {

@@ -374,2 +401,3 @@ if (!Array.isArray(value))

isObjectOrArray,
isPrivilege,
isShardingKey,

@@ -376,0 +404,0 @@ isSodaDocument,

@@ -34,4 +34,4 @@ // Copyright (c) 2023, 2024, Oracle and/or its affiliates.

VERSION_MINOR: 5,
VERSION_PATCH: 0,
VERSION_PATCH: 1,
VERSION_SUFFIX: ''
};
{
"name": "oracledb",
"version": "6.5.0",
"version": "6.5.1",
"description": "A Node.js module for Oracle Database access from JavaScript and TypeScript",

@@ -5,0 +5,0 @@ "license": "(Apache-2.0 OR UPL-1.0)",

@@ -1,2 +0,2 @@

# node-oracledb version 6.5.0
# node-oracledb version 6.5.1

@@ -7,3 +7,3 @@ The node-oracledb add-on for Node.js powers high performance Oracle Database

Use node-oracledb 6.5.0 to connect Node.js 14.6, or later, to Oracle
Use node-oracledb 6.5.1 to connect Node.js 14.6, or later, to Oracle
Database. Older versions of node-oracledb may work with older versions of

@@ -10,0 +10,0 @@ Node.js.

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