code: function (query, skip, limit) {
      var findStatement = {};
  
      if (query.aggregate) {
        findStatement.aggregate = query.aggregate;
      }
  
      if (query.context) {
        findStatement.context = query.context;
      }
  
      if (query.aggregateId) {
        findStatement.aggregateId = query.aggregateId;
      }
  
      var query = this.events.find(findStatement, { sort: [['commitStamp', 'asc'], ['streamRevision', 'asc'], ['commitSequence', 'asc']] });
  
      if (skip) {
        query.skip(skip);
      }
      
      if (limit && limit > 0) {
        query.limit(limit);
      }
  
      return query;
    }
docs: streaming API