Skip to content

Commit

Permalink
Fixed bug that prevented getting the value of a RAW attribute in a Db…
Browse files Browse the repository at this point in the history
…Object that is null
  • Loading branch information
sharadraju committed Oct 5, 2023
1 parent e4d7044 commit b175843
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ Thin Mode Changes
in embedded quotes and in JSON syntax.
`Issue #1605 <https://github.com/oracle/node-oracledb/issues/1605>`__.

#) Corrected bug that caused cursors to be leaked when calling
Connection.getStatementInfo().
#) Fixed bug that caused cursors to be leaked when calling
:meth:`connection.getStatementInfo()`.

#) Fixed bug that caused an exception to be thrown unnecessarily when a connection was closed.
`Issue #1604 <https://github.com/oracle/node-oracledb/issues/1604>`__.

#) Fixed bug that prevented getting the value of a RAW attribute on a DbObject
which is null.

Thick Mode Changes
++++++++++++++++++

Expand Down
5 changes: 4 additions & 1 deletion lib/thin/dbObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ class ThinDbObjectImpl extends DbObjectImpl {
case types.DB_TYPE_NCHAR:
return buf.readStr(constants.CSFRM_NCHAR);
case types.DB_TYPE_RAW:
return Buffer.from(buf.readBytesWithLength());
value = buf.readBytesWithLength();
if (value !== null)
value = Buffer.from(value);
return value;
case types.DB_TYPE_BINARY_DOUBLE:
return buf.readBinaryDouble();
case types.DB_TYPE_BINARY_FLOAT:
Expand Down

0 comments on commit b175843

Please sign in to comment.