Closed hellower closed 10 months ago
Thanks for the report.
diff --git a/lib/impl/resultset.js b/lib/impl/resultset.js
index 3815e8e8..7d96a1f2 100644
--- a/lib/impl/resultset.js
+++ b/lib/impl/resultset.js
@@ -111,14 +111,17 @@ class ResultSetImpl {
if (metadata.dbType === types.DB_TYPE_NUMBER &&
metadata.fetchType === types.DB_TYPE_NUMBER) {
converter = (v) => (v === null) ? null : parseFloat(v);
- } else if (metadata.fetchType === types.DB_TYPE_VARCHAR &&
- (metadata.dbType === types.DB_TYPE_BINARY_DOUBLE ||
+ } else if (metadata.fetchType === types.DB_TYPE_VARCHAR) {
+ if (metadata.dbType === types.DB_TYPE_BINARY_DOUBLE ||
metadata.dbType === types.DB_TYPE_BINARY_FLOAT ||
metadata.dbType === types.DB_TYPE_DATE ||
metadata.dbType === types.DB_TYPE_TIMESTAMP ||
metadata.dbType === types.DB_TYPE_TIMESTAMP_LTZ ||
- metadata.dbType === types.DB_TYPE_TIMESTAMP_TZ)) {
- converter = (v) => (v === null) ? null : v.toString();
+ metadata.dbType === types.DB_TYPE_TIMESTAMP_TZ) {
+ converter = (v) => (v === null) ? null : v.toString();
+ } else if (metadata.dbType === types.DB_TYPE_RAW) {
+ converter = (v) => (v === null) ? null : v.toString('hex').toUpperCase();
+ }
}
if (userConverter && converter) {
const internalConverter = converter;
The patch file for this issue has been uploaded in GitHub. This fix will be available as part of the 6.1 release
This is now fixed in the 6.1 release.
$ npm list|grep oracle ├── oracledb@6.0.2
$ uname -a Linux tnt-factory-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
................ node.js ........................ oracledb.fetchAsString = [oracledb.DB_TYPE_RAW];
,.. select saddr from v$session where rownum <= 1; .. ..............
thick mode 00000000690F5028 <--- fetch as string / good
thin mode {"data": [0,0,0,0,105,15,80,40], "type": "Buffer"} -- not good