lib/connection/result/result_stream.js
function(err, chunk)
  {
    // unsubscribe from the 'loadcomplete' event
    chunk.removeListener('loadcomplete', onLoadComplete);

    // if the chunk load succeeded
    if (!err)
    {
      // move on to the next chunk
      start++;

      // emit an event to signal that new data is available
      self.emit('data', chunk);
    }
    else
    {
      // close the stream with an error; also, include a callback when emitting
      // the event in case someone wants to fix the problem and ask us to
      // continue from where we got interrupted
      close(self, err, doLoad);
    }
  }
function(err, chunk)
  {
    // unsubscribe from the 'loadcomplete' event
    chunk.removeListener('loadcomplete', onLoadComplete);

    // if the chunk load succeeded
    if (!err)
    {
      // move on to the next chunk
      start++;

      // emit an event to signal that new data is available
      self.emit('data', chunk);
    }
    else
    {
      // close the stream with an error; also, include a callback when emitting
      // the event in case someone wants to fix the problem and ask us to
      // continue from where we got interrupted
      close(self, err, doLoad);
    }
  }
function ( err , chunk ) { // unsubscribe from the 'loadcomplete' event chunk . removeListener ( 'loadcomplete' , onLoadComplete ) ; // if the chunk load succeeded if ( ! err ) { // move on to the next chunk start ++ ; // emit an event to signal that new data is available self . emit ( 'data' , chunk ) ; } else { // close the stream with an error; also, include a callback when emitting // the event in case someone wants to fix the problem and ask us to // continue from where we got interrupted close ( self , err , doLoad ) ; } }
Called when a chunk fires a 'loadcomplete' event.

@param {Error} err
@param {Chunk} chunk
Called when a chunk fires a loadcomplete event .