@@ -64,6 +64,12 @@ Persistent<FunctionTemplate> ResultSet::resultSetTemplate_s;
64
64
/*
65
65
DESCRIPTION
66
66
Store the config in pool instance.
67
+
68
+ PARAMETERS
69
+ stmt - dpi statement
70
+ env - dpi Env
71
+ conn - njs connection
72
+ outFormat - outFormat of the result set
67
73
*/
68
74
void ResultSet::setResultSet ( dpi::Stmt *stmt, dpi::Env *env,
69
75
Connection *conn, unsigned int outFormat )
@@ -179,7 +185,7 @@ NAN_SETTER(ResultSet::SetMetaData)
179
185
Get Row method on Result Set class.
180
186
181
187
PARAMETERS:
182
- Arguments - callback
188
+ args - callback
183
189
*/
184
190
NAN_METHOD (ResultSet::GetRow)
185
191
{
@@ -208,7 +214,7 @@ NAN_METHOD(ResultSet::GetRow)
208
214
Get Rows method on Result Set class.
209
215
210
216
PARAMETERS:
211
- Arguments - numRows, callback
217
+ args - numRows, callback
212
218
*/
213
219
NAN_METHOD (ResultSet::GetRows)
214
220
{
@@ -224,6 +230,12 @@ NAN_METHOD(ResultSet::GetRows)
224
230
NJS_CHECK_NUMBER_OF_ARGS ( getRowsBaton->error , args, 2 , 2 , exitGetRows );
225
231
NJS_GET_ARG_V8UINT ( getRowsBaton->numRows , getRowsBaton->error ,
226
232
args, 0 , exitGetRows );
233
+ if (!getRowsBaton->numRows )
234
+ {
235
+ getRowsBaton->error = NJSMessages::getErrorMsg (
236
+ errInvalidParameterValue, 1 );
237
+ goto exitGetRows;
238
+ }
227
239
228
240
getRowsBaton->fetchMultiple = true ;
229
241
getRowsBaton->njsRS = njsResultSet;
@@ -238,7 +250,7 @@ NAN_METHOD(ResultSet::GetRows)
238
250
Common method for GetRow and GetRows method
239
251
240
252
PARAMETERS:
241
- Arguments - resultset baton
253
+ getRowsBaton - resultset baton
242
254
*/
243
255
void ResultSet::GetRowsCommon (rsBaton *getRowsBaton)
244
256
{
@@ -263,8 +275,7 @@ void ResultSet::GetRowsCommon(rsBaton *getRowsBaton)
263
275
goto exitGetRowsCommon;
264
276
}
265
277
266
- getRowsBaton->ebaton = new eBaton;
267
- ebaton = getRowsBaton->ebaton ;
278
+ getRowsBaton->ebaton = ebaton = new eBaton;
268
279
njsRS = getRowsBaton->njsRS ;
269
280
270
281
njsRS->state_ = ACTIVE;
@@ -289,7 +300,7 @@ void ResultSet::GetRowsCommon(rsBaton *getRowsBaton)
289
300
Worker function of GetRows method
290
301
291
302
PARAMETERS:
292
- UV queue work block
303
+ req - UV queue work block
293
304
294
305
NOTES:
295
306
DPI call execution.
@@ -345,7 +356,7 @@ void ResultSet::Async_GetRows(uv_work_t *req)
345
356
Callback function of GetRows method
346
357
347
358
PARAMETERS:
348
- UV queue work block
359
+ req - UV queue work block
349
360
*/
350
361
void ResultSet::Async_AfterGetRows (uv_work_t *req)
351
362
{
@@ -401,7 +412,7 @@ void ResultSet::Async_AfterGetRows(uv_work_t *req)
401
412
Close method
402
413
403
414
PARAMETERS:
404
- Arguments - Callback
415
+ args - Callback
405
416
*/
406
417
NAN_METHOD (ResultSet::Close)
407
418
{
@@ -450,7 +461,7 @@ NAN_METHOD(ResultSet::Close)
450
461
Worker function of close.
451
462
452
463
PARAMETERS:
453
- UV queue work block
464
+ req - UV queue work block
454
465
455
466
NOTES:
456
467
DPI call execution.
@@ -486,7 +497,7 @@ void ResultSet::Async_Close(uv_work_t *req)
486
497
Callback function of close
487
498
488
499
PARAMETERS:
489
- UV queue work block
500
+ req - UV queue work block
490
501
*/
491
502
void ResultSet::Async_AfterClose (uv_work_t *req)
492
503
{
@@ -522,7 +533,8 @@ void ResultSet::Async_AfterClose(uv_work_t *req)
522
533
Free FetchBuffers
523
534
524
535
PARAMETERS:
525
- Fetch Buffer, numCols
536
+ defineBuffers - Define bufferes from njsResultSet,
537
+ numCols - # of columns
526
538
*/
527
539
void ResultSet::clearFetchBuffer ( Define* defineBuffers, unsigned int numCols)
528
540
{
0 commit comments