setLimit static method

dynamic setLimit(
  1. dynamic query,
  2. dynamic limit
)

Implementation

static setLimit(query, limit) {
  if (limit < 1) {
    throw new Exception('Limit cannot be less than one.');
  }
  var q = query;
  q['limit'] = limit;
  return q;
}