lib/connection/result/row_stream.js
function onResultStreamData(chunk)
  {
    // unsubscribe from the result stream's 'data' and 'close' events
    resultStream.removeListener('data', onResultStreamData);
    resultStream.removeListener('close', onResultStreamClose);

    // get all the rows in the chunk that overlap with the requested window,
    // and use the resulting array as the new row buffer
    var chunkStart = chunk.getStartIndex();
    var chunkEnd = chunk.getEndIndex();
    rowBuffer = chunk.getRows().slice(
        Math.max(chunkStart, start) - chunkStart,
        Math.min(chunkEnd, end) + 1 - chunkStart);

    // reset the row index
    rowIndex = 0;

    // process the row buffer
    processRowBuffer();
  }
function onResultStreamData(chunk)
  {
    // unsubscribe from the result stream's 'data' and 'close' events
    resultStream.removeListener('data', onResultStreamData);
    resultStream.removeListener('close', onResultStreamClose);

    // get all the rows in the chunk that overlap with the requested window,
    // and use the resulting array as the new row buffer
    var chunkStart = chunk.getStartIndex();
    var chunkEnd = chunk.getEndIndex();
    rowBuffer = chunk.getRows().slice(
        Math.max(chunkStart, start) - chunkStart,
        Math.min(chunkEnd, end) + 1 - chunkStart);

    // reset the row index
    rowIndex = 0;

    // process the row buffer
    processRowBuffer();
  }
function onResultStreamData ( chunk ) { // unsubscribe from the result stream's 'data' and 'close' events resultStream . removeListener ( 'data' , onResultStreamData ) ; resultStream . removeListener ( 'close' , onResultStreamClose ) ; // get all the rows in the chunk that overlap with the requested window, // and use the resulting array as the new row buffer var chunkStart = chunk . getStartIndex ( ) ; var chunkEnd = chunk . getEndIndex ( ) ; rowBuffer = chunk . getRows ( ) . slice ( Math . max ( chunkStart , start ) - chunkStart , Math . min ( chunkEnd , end ) + 1 - chunkStart ) ; // reset the row index rowIndex = 0 ; // process the row buffer processRowBuffer ( ) ; }
Called when the result stream reads a new chunk.

@param {Chunk} chunk
Called when the result stream reads a new chunk .