Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions hana/lib/drivers/hdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@ 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')

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' },
Expand All @@ -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
...creds,
}

Expand Down
2 changes: 1 addition & 1 deletion hana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@cap-js/db-service": "^2.1.1",
"hdb": "^0.19.5"
"hdb": "^2.0.0"
},
"peerDependencies": {
"@sap/hana-client": "^2",
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.