Comparing version 0.17.0 to 0.17.1
@@ -32,3 +32,8 @@ // Copyright 2013 SAP AG. | ||
// public | ||
this.type = ld.type; | ||
options = options || {}; | ||
if (ld.defaultType && options.useDefaultType) { | ||
this.type = ld.defaultType | ||
} else { | ||
this.type = ld.type; | ||
} | ||
this.locatorId = ld.locatorId; | ||
@@ -61,3 +66,2 @@ this.finished = false; | ||
this._offset = 1; | ||
options = options || {}; | ||
this._readSize = options.readSize || Lob.DEFAULT_READ_SIZE; | ||
@@ -64,0 +68,0 @@ this._data = undefined; |
@@ -224,6 +224,6 @@ // Copyright 2013 SAP AG. | ||
Reader.prototype.readLob = function readLob(type) { | ||
Reader.prototype.readLob = function readLob(defaultType) { | ||
/* jshint bitwise:false, unused:false */ | ||
// offset 0 | ||
type = this.buffer[this.offset] || type; | ||
var type = this.buffer[this.offset] || defaultType; | ||
this.offset += 1; | ||
@@ -260,3 +260,3 @@ // offset 1 | ||
// if (!byteLength && !charLength) { return null; } | ||
var ld = new LobDescriptor(type, options, charLength, byteLength, locatorId, chunk); | ||
var ld = new LobDescriptor(type, options, charLength, byteLength, locatorId, chunk, defaultType); | ||
return this.lobFactory.createLob(ld); | ||
@@ -306,3 +306,5 @@ }; | ||
function LobDescriptor(type, options, charLength, byteLength, locatorId, chunk) { | ||
Reader.LobDescriptor = LobDescriptor; | ||
function LobDescriptor(type, options, charLength, byteLength, locatorId, chunk, defaultType) { | ||
this.type = type; | ||
@@ -314,2 +316,3 @@ this.options = options; | ||
this.chunk = chunk; | ||
this.defaultType = defaultType || type; | ||
} | ||
@@ -316,0 +319,0 @@ |
@@ -96,2 +96,10 @@ // Copyright 2013 SAP AG. | ||
} | ||
}, | ||
ignoreDefaultLobType: { | ||
get: function shouldIgnoreDefaultLobType() { | ||
if (this._connection && this._connection._settings) { | ||
return this._connection._settings.ignoreDefaultLobType; | ||
} | ||
return false; | ||
} | ||
} | ||
@@ -268,3 +276,4 @@ }); | ||
readSize: this.readSize, | ||
useCesu8: this.useCesu8 | ||
useCesu8: this.useCesu8, | ||
useDefaultType: !this.ignoreDefaultLobType | ||
}, options); | ||
@@ -271,0 +280,0 @@ return new Lob(sendReadLob.bind(this), ld, options); |
@@ -9,3 +9,3 @@ { | ||
"description": "SAP HANA Database Client for Node", | ||
"version": "0.17.0", | ||
"version": "0.17.1", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
287749
8035