Skip to content

Commit 7753717

Browse files
committed
Another REF CURSOR patch
1 parent c94aa1f commit 7753717

File tree

2 files changed

+4
-29
lines changed

2 files changed

+4
-29
lines changed

src/njs/src/njsConnection.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,13 +1019,6 @@ void Connection::PrepareAndBind (eBaton* executeBaton)
10191019
}
10201020
}
10211021

1022-
// Allocate handle for Ref Cursor
1023-
if ( executeBaton->binds[index]->type == DpiRSet )
1024-
{
1025-
executeBaton->binds[index]->value = executeBaton->dpiconn->
1026-
getStmt();
1027-
}
1028-
10291022
// Convert v8::Date to Oracle DB Type for IN and IN/OUT binds
10301023
if ( executeBaton->binds[index]->type == DpiTimestampLTZ &&
10311024
// InOut bind
@@ -1074,13 +1067,6 @@ void Connection::PrepareAndBind (eBaton* executeBaton)
10741067
for(unsigned int index = 0 ;index < executeBaton->binds.size();
10751068
index++)
10761069
{
1077-
// Allocate handle for Ref Cursor
1078-
if ( executeBaton->binds[index]->type == DpiRSet )
1079-
{
1080-
executeBaton->binds[index]->value = executeBaton->dpiconn->
1081-
getStmt();
1082-
}
1083-
10841070
// Allocate for OUT Binds
10851071
// For DML Returning, allocation happens through callback
10861072
if ( executeBaton->binds[index]->isOut &&
@@ -3021,6 +3007,10 @@ void Connection::cbDynBufferAllocate ( void *ctx, bool dmlReturning,
30213007
bind->value = bind->dttmarr->init(nRows);
30223008
}
30233009
break;
3010+
3011+
case dpi::DpiRSet:
3012+
bind->value = executeBaton->dpiconn->getStmt ();
3013+
break;
30243014
}
30253015
}
30263016

src/njs/src/njsResultSet.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ NAN_PROPERTY_GETTER(ResultSet::GetMetaData)
187187
ResultSet* njsResultSet = ObjectWrap::Unwrap<ResultSet>(args.Holder());
188188
string msg;
189189

190-
if ( njsResultSet->numCols_ == 0 )
191-
{
192-
njsResultSet->state_ = INVALID;
193-
}
194-
195190
if(!njsResultSet->njsconn_->isValid())
196191
{
197192
msg = NJSMessages::getErrorMsg ( errInvalidConnection );
@@ -253,11 +248,6 @@ NAN_METHOD(ResultSet::GetRow)
253248
getRowsBaton->njsRS = njsResultSet;
254249
NanAssignPersistent(getRowsBaton->cb, callback );
255250

256-
if ( njsResultSet->numCols_ == 0 )
257-
{
258-
njsResultSet->state_ = INVALID ;
259-
}
260-
261251
if(njsResultSet->state_ == INVALID)
262252
{
263253
getRowsBaton->error = NJSMessages::getErrorMsg ( errInvalidResultSet );
@@ -303,11 +293,6 @@ NAN_METHOD(ResultSet::GetRows)
303293
getRowsBaton->njsRS = njsResultSet;
304294
NanAssignPersistent(getRowsBaton->cb, callback );
305295

306-
if ( njsResultSet->numCols_ == 0 )
307-
{
308-
njsResultSet->state_ = INVALID;
309-
}
310-
311296
if(njsResultSet->state_ == INVALID)
312297
{
313298
getRowsBaton->error = NJSMessages::getErrorMsg ( errInvalidResultSet );

0 commit comments

Comments
 (0)