lib/connection/statement.js
function fetchRowsFromResult(options, statement, context)
{
  var numInterrupts = 0;

  // forward to the result to get a FetchRowsOperation object
  var operation = context.result.fetchRows(options);

  // subscribe to the operation's 'complete' event
  operation.on('complete', function(err, continueCallback)
  {
    // we want to retry if the error is retryable and the
    // result stream hasn't been closed too many times
    if (Errors.isLargeResultSetError(err) && err.response &&
        (err.response.statusCode === 403) &&
        (numInterrupts <
        context.connectionConfig.getResultStreamInterrupts()))
    {
      // increment the interrupt counter
      numInterrupts++;

      // issue a request to fetch the result again
      sendRequestPostExec(context, function(err, body)
      {
        // refresh the result
        context.onStatementRequestComp(err, body);

        // if there was no error, continue from where we got interrupted
        if (!err)
        {
          continueCallback();
        }
      });
    }
    else
    {
      endFetchRows(options, statement, context);
    }
  });
}
function fetchRowsFromResult(options, statement, context)
{
  var numInterrupts = 0;

  // forward to the result to get a FetchRowsOperation object
  var operation = context.result.fetchRows(options);

  // subscribe to the operation's 'complete' event
  operation.on('complete', function(err, continueCallback)
  {
    // we want to retry if the error is retryable and the
    // result stream hasn't been closed too many times
    if (Errors.isLargeResultSetError(err) && err.response &&
        (err.response.statusCode === 403) &&
        (numInterrupts <
        context.connectionConfig.getResultStreamInterrupts()))
    {
      // increment the interrupt counter
      numInterrupts++;

      // issue a request to fetch the result again
      sendRequestPostExec(context, function(err, body)
      {
        // refresh the result
        context.onStatementRequestComp(err, body);

        // if there was no error, continue from where we got interrupted
        if (!err)
        {
          continueCallback();
        }
      });
    }
    else
    {
      endFetchRows(options, statement, context);
    }
  });
}
function fetchRowsFromResult ( options , statement , context ) { var numInterrupts = 0 ; // forward to the result to get a FetchRowsOperation object var operation = context . result . fetchRows ( options ) ; // subscribe to the operation's 'complete' event operation . on ( 'complete' , function ( err , continueCallback ) { // we want to retry if the error is retryable and the // result stream hasn't been closed too many times if ( Errors . isLargeResultSetError ( err ) && err . response && ( err . response . statusCode === 403 ) && ( numInterrupts < context . connectionConfig . getResultStreamInterrupts ( ) ) ) { // increment the interrupt counter numInterrupts ++ ; // issue a request to fetch the result again sendRequestPostExec ( context , function ( err , body ) { // refresh the result context . onStatementRequestComp ( err , body ) ; // if there was no error, continue from where we got interrupted if ( ! err ) { continueCallback ( ) ; } } ) ; } else { endFetchRows ( options , statement , context ) ; } } ) ; }
Fetches rows from the statement's result.

@param {Object} options the options passed to fetchRows().
@param {Object} statement
@param {Object} context
Fetches rows from the statement s result .