Socket
Socket
Sign inDemoInstall

@sap/hana-client

Package Overview
Dependencies
2
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.19.21 to 2.20.15

23

CHANGELOG.md

@@ -0,1 +1,24 @@

# Hana Client 2.20.x Drivers
Please see the "What’s new in the SAP HANA Client" section in the official HANA client 2.20 documentation:
https://help.sap.com/viewer/product/SAP_HANA_CLIENT/2.20/en-US
For the latest updates please see SAP Note 3427733 - SAP HANA Client 2.20 Release Notes
https://me.sap.com/notes/3427733
## Version 2.20.15
### Changes:
- Issue Number 318725: Calling server KPI functions could have caused the application to block temporarily.
- Issue Number 317039: A small memory leak would have occurred when Connection.onTrace was called.
### Underlying SQLDBC changes:
- Issue Number 319386: Unexpected -10901 error could have occurred.
- Issue Number 317050: Some trace messages could have been missing from a connection trace.
- Issue Number 304335: Unnecessary "too many session variables" errors could have occurred.
# Hana Client 2.19.x Drivers

@@ -2,0 +25,0 @@

@@ -12,2 +12,5 @@ 'use strict'

},
clean: function(obj, ...args) {
return promisify(obj, obj.clean, args);
},
commit: function(obj, ...args) {

@@ -40,2 +43,5 @@ return promisify(obj, obj.commit, args);

},
switchUser: function(obj, ...args) {
return promisify(obj, obj.switchUser, args);
},

@@ -42,0 +48,0 @@ // ResultSet

90

extension/Stream.js

@@ -7,3 +7,3 @@ 'use strict';

createObjectStream: function (resultset) {
return new HanaObjectStream(resultset);
return new HanaRSStream(resultset, false);
},

@@ -13,3 +13,3 @@

createArrayStream: function (resultset) {
return new HanaArrayStream(resultset);
return new HanaRSStream(resultset, true);
},

@@ -44,61 +44,63 @@

// Object stream
function HanaObjectStream(resultset) {
// HanaRSStream is used by both createObjectStream and createArrayStream
function HanaRSStream(resultset, asArray) {
checkParameter('resultset', resultset)
Readable.call(this, { objectMode: true });
resultset.setAsArrayDefault(asArray);
this.resultset = resultset;
};
util.inherits(HanaObjectStream, Readable);
util.inherits(HanaRSStream, Readable);
HanaObjectStream.prototype._read = function () {
HanaRSStream.prototype._read = function () {
var stream = this;
this.resultset.next(function (err, ret) {
if (err === undefined) {
if (ret) {
stream.push(stream.resultset.getValues());
// There are 3 combinations of sync vs async next and getValues.
// When nextCanBlock is false, the stream is about 2x faster
// than without this optimization.
// This implementation might be simpler if promises were used.
if(this.resultset.nextCanBlock()) {
// async next
this.resultset.next(function (err, ret) {
if (err === undefined) {
if (ret) {
if(stream.resultset.getValuesCanBlock()) {
// async getValues
stream.resultset.getValues(function (err, ret) {
if (err === undefined) {
stream.push(ret);
} else {
stream.emit('error', err);
}
});
} else {
// sync getValues
try {
stream.push(stream.resultset.getValues());
} catch(err) {
stream.emit('error', err);
}
}
} else {
stream.push(null);
}
} else {
stream.push(null);
stream.emit('error', err);
}
} else {
stream.emit('error', err);
}
});
};
HanaObjectStream.prototype._destroy = function () {
this.push(null);
};
// Array stream
function HanaArrayStream(resultset) {
checkParameter('resultset', resultset)
Readable.call(this, { objectMode: true });
this.resultset = resultset;
this.columnInfo = this.resultset.getColumnInfo();
this.colCount = this.columnInfo.length;
};
util.inherits(HanaArrayStream, Readable);
HanaArrayStream.prototype._read = function () {
var stream = this;
this.resultset.next(function (err, ret) {
if (err === undefined) {
});
} else {
// nextCanBlock returned false, use sync next and getValues.
try {
var ret = this.resultset.next();
if (ret) {
var values = [];
for (var i = 0; i < stream.colCount; i++) {
values.push(stream.resultset.getValue(i));
}
stream.push(values);
stream.push(stream.resultset.getValues());
} else {
stream.push(null);
}
} else {
} catch(err) {
stream.emit('error', err);
}
});
}
};
HanaArrayStream.prototype._destroy = function () {
HanaRSStream.prototype._destroy = function () {
this.push(null);

@@ -105,0 +107,0 @@ };

@@ -55,2 +55,7 @@ declare module '@sap/hana-client' {

function setConnectionPoolLimit(limit: number): void;
function setThreadPoolLimit(limit: number): void;
function getAsyncRunning(threadID: string): number;
function getAsyncBlocked(threadID: string): number;
function getAsyncWaiting(threadID: string): number;
function getThreadCount(): number;

@@ -80,4 +85,6 @@ class ResultSet {

public next(fn: HanaResultCallback<boolean>): void;
public nextCanBlock(): boolean;
public nextResult(): boolean;
public nextResult(fn: HanaResultCallback<boolean>): void;
public setAsArrayDefault(flag: boolean): void;
}

@@ -156,2 +163,3 @@

public clearPool(): number;
public clean(fn?: HanaErrorCallback): void;
public commit(fn?: HanaErrorCallback): void;

@@ -196,2 +204,4 @@ public connect(fn: HanaErrorCallback): void;

public state(): string;
public switchUser(uid: string, pwd: string): void;
public switchUser(uid: string, pwd: string, fn: HanaErrorCallback): void;
}

@@ -198,0 +208,0 @@

{
"name": "@sap/hana-client",
"version": "2.19.21",
"version": "2.20.15",
"lockfileVersion": 1,

@@ -5,0 +5,0 @@ "requires": true,

@@ -5,3 +5,3 @@ {

"description": "Official SAP HANA Node.js Driver",
"version": "2.19.21",
"version": "2.20.15",
"dependencies": {

@@ -8,0 +8,0 @@ "debug": "3.1.0"

@@ -17,3 +17,3 @@ # @sap/hana-client

The @sap/hana-client driver supports versions of Node.js 10 and higher.
The @sap/hana-client driver supports versions of Node.js 14 and higher.

@@ -20,0 +20,0 @@ ## Community

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc