diff --git a/hana/lib/drivers/hdb.js b/hana/lib/drivers/hdb.js index a2a200f66..7cebb8fda 100644 --- a/hana/lib/drivers/hdb.js +++ b/hana/lib/drivers/hdb.js @@ -2,7 +2,6 @@ const { Readable, Stream, promises: { pipeline } } = require('stream') const { StringDecoder } = require('string_decoder') const { text } = require('stream/consumers') -const cds = require('@sap/cds') const hdb = require('hdb') const iconv = require('iconv-lite') @@ -10,16 +9,6 @@ const { driver, prom, handleLevel } = require('./base') const { resultSetStream } = require('./stream') const { wrap_client } = require('./dynatrace') -if (cds.env.features.sql_simple_queries === 3) { - // Make hdb return true / false - const Reader = require('hdb/lib/protocol/Reader.js') - Reader.prototype._readTinyInt = Reader.prototype.readTinyInt - Reader.prototype.readTinyInt = function () { - const ret = this._readTinyInt() - return ret == null ? ret : !!ret - } -} - const credentialMappings = [ { old: 'certificate', new: 'ca' }, { old: 'encrypt', new: 'useTLS' }, @@ -35,6 +24,7 @@ class HDBDriver extends driver { constructor(creds) { creds = { fetchSize: 1 << 16, // V8 default memory page size + dataFormatSupport: 7, // with 7 hana supports booleans compress: false, // compression is disabled by default to avoic cpu overhead ...creds, } diff --git a/hana/package.json b/hana/package.json index 6f78b4792..10fe81c74 100644 --- a/hana/package.json +++ b/hana/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "@cap-js/db-service": "^2.6.0", - "hdb": "^2.0.0" + "hdb": "^2.26.2" }, "peerDependencies": { "@sap/hana-client": "^2",