Skip to content

Commit

Permalink
fix errors when reading clob, nclob and blob (#4027)
Browse files Browse the repository at this point in the history
* fix errors when reading clob and nclob

Signed-off-by: Iliyan Velichkov <[email protected]>

* fix readBlobValue as well

Signed-off-by: Iliyan Velichkov <[email protected]>

---------

Signed-off-by: Iliyan Velichkov <[email protected]>
  • Loading branch information
iliyan-velichkov authored Jun 10, 2024
1 parent bcd5033 commit 3d7c0da
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ function isHanaDatabase(connection) {
}

function readBlobValue(value) {
return value.getBytes(1, value.length());
return value ? value.getBytes(1, value.length()) : value;
}

function createBlobValue(native, value) {
Expand Down Expand Up @@ -933,7 +933,7 @@ function createBlobValue(native, value) {
}

function readClobValue(value) {
return value.getSubString(1, value.length());
return value ? value.getSubString(1, value.length()) : value;
}

function createClobValue(native, value) {
Expand Down Expand Up @@ -968,7 +968,7 @@ function createClobValue(native, value) {
}

function readNClobValue(value) {
return value.getSubString(1, value.length());
return value ? value.getSubString(1, value.length()) : value;
}

function createNClobValue(native, value) {
Expand Down Expand Up @@ -1007,4 +1007,4 @@ function getDateValue(value) {
return new Date(value);
}
return value;
}
}

0 comments on commit 3d7c0da

Please sign in to comment.