diff --git a/package.json b/package.json index 980e18fc..5f16b6e1 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,50 @@ { - - "name" : "oracledb", - "version" : "0.5.0", - "description" : "Oracle Database driver by Oracle Corp.", - "license" : "Apache 2.0", - "homepage": "http://www.oracle.com/technetwork/database/database-technologies/node_js/index.html", - "keywords" : [ - "oracledb", "dboracle", "Node.js", "SQL", "PL/SQL", "connection", "connectivity", "OCI", "client", "plugin", "library", "driver", "extension", "binding", "interface", "adapter", "module", "DB", "official", "Database", "Oracle" - ], - "repository" : { - "type" : "git", - "url" : "git://github.com/oracle/node-oracledb.git" - }, - "dependencies" : { - "nan": "^1.7.0" - }, - "engines" : { - "node" : ">=0.10.28" - }, - "engineStrict": true, - "maintainers" : [ - { - "name" : "Oracle Corp." - } - ], - "bugs" : { - "url" : "https://github.com/oracle/node-oracledb/issues" - }, - "main" : "./index.js" + "name": "oracledb", + "version": "0.5.0", + "description": "Oracle Database driver by Oracle Corp.", + "license": "Apache 2.0", + "homepage": "http://www.oracle.com/technetwork/database/database-technologies/node_js/index.html", + "keywords": [ + "oracledb", + "dboracle", + "Node.js", + "SQL", + "PL/SQL", + "connection", + "connectivity", + "OCI", + "client", + "plugin", + "library", + "driver", + "extension", + "binding", + "interface", + "adapter", + "module", + "DB", + "official", + "Database", + "Oracle" + ], + "repository": { + "type": "git", + "url": "git://github.com/oracle/node-oracledb.git" + }, + "dependencies": { + "nan": "^1.8.4" + }, + "engines": { + "node": ">=0.10.28" + }, + "engineStrict": true, + "maintainers": [ + { + "name": "Oracle Corp." + } + ], + "bugs": { + "url": "https://github.com/oracle/node-oracledb/issues" + }, + "main": "./index.js" } diff --git a/src/njs/src/njsConnection.cpp b/src/njs/src/njsConnection.cpp index 7210c782..303249c8 100644 --- a/src/njs/src/njsConnection.cpp +++ b/src/njs/src/njsConnection.cpp @@ -1247,35 +1247,39 @@ v8::Handle Connection::GetArrayValue ( Bind *binds, unsigned long cou for ( index = 0 ; index < count ; index ++ ) { + if( + binds->ind[index] == -1 && + ( + (binds->type == dpi::DpiVarChar) || + (binds->type == dpi::DpiInteger) || + (binds->type == dpi::DpiDouble) || + (binds->type == dpi::DpiTimestampLTZ) + ) + ) + { + arrVal->Set( index, NanNull() ); + continue; + } + switch ( binds->type ) { case dpi::DpiVarChar: arrVal->Set ( index, - ( binds->ind[index] == -1 ) ? NanNull() : - NanNew ((char *)binds->value + - (index * binds->maxSize ), - binds->len2[index])); + NanNew ((char *)binds->value + + (index * binds->maxSize ), + binds->len2[index])); break; case dpi::DpiInteger: arrVal->Set ( index, - (binds->ind[index] == -1 ) ? NanNull() : - NanNew ( *((int *)binds->value + index ))); + NanNew ( *((int *)binds->value + index ))); break; case dpi::DpiDouble: arrVal->Set ( index, - (binds->ind[index] == -1 ) ? NanNull() : - NanNew ( *((double *)binds->value + index ))); + NanNew ( *((double *)binds->value + index ))); break; case dpi::DpiTimestampLTZ: - if ( binds->ind[index] != -1 ) - { arrVal->Set ( index, NanNew (*((long double *)binds->value + index )) ); - } - else - { - arrVal->Set ( index, NanNull () ); - } break; default: break;