Set the query limit

// limit(<limit>)
->limit(20)

// limit(<offset>, <limit>)
->limit(60, 20)

@param int           $limit
@param int           $limit2
@return self The current query builder.
343099
public function limit($limit, $limit2 = null)
    {
        if (!is_null($limit2)) 
        {
            $this->offset = (int) $limit;
            $this->limit = (int) $limit2;
        } else {
            $this->limit = (int) $limit;
        }

        return $this;
    }
1147511
public function setLimit($limit)
    {
        $this->limit = (int)$limit;
        $this->total->pages = 1;

        if ($this->limit > 0) {
            $this->total->pages = @ceil($this->total->rows / $this->limit);
        }

        $activePage = $this->getActivePage();

        $this->numbering = new SplArrayObject([
            'start' => $start = ($activePage == 1 ? 1 : ($activePage - 1) * $this->limit + 1),
            'end'   => ($start + $this->total->founds) - 1,
        ]);

        return $this;
    }
1086525
public function setLimits(array $limits)
    {
        $this->limits = array();
        foreach ($limits as $limit) {
            $this->setLimit($limit);
        }
    }
668281
public function limit(int $limit = 0): Update
    {
        if (!\is_int($limit) || $limit <= 0) {
            throw new InvalidArgumentException('$limit have to be a positive integer');
        }
        $this->limit = $limit;
        return $this;
    }
219918
public function limit($limit, $offset = null)
    {
        if ($offset !== null) {
            $this->builder->setFirstResult((int) $offset);
        }

        $this->builder->setMaxResults((int) $limit);

        return $this;
    }
106967
public function limit($limit = 0, $offset = 0)
    {
        if (!$limit) {
            return $this;
        }
        if ($offset) {
            $limit .= " OFFSET {$offset}";
        }
        $this->_parts['limit'] = $limit;
        return $this;
    }
1235539
public R setLimit(final int limit){
        mQueryMap.put(FIELD_LIMIT, Integer.toString(limit));
        return (R)this;
    }
479812
protected function set_limit($query, $limit = 0, $offset = 0)
    {
        $limit  = intval($limit);
        $offset = intval($offset);
        $end    = $offset + $limit;

        // @TODO: Oracle 12g has better OFFSET support

        if (!$offset) {
            $query = "SELECT * FROM ($query) a WHERE rownum <= $end";
        }
        else {
            $query = "SELECT * FROM (SELECT a.*, rownum as rn FROM ($query) a WHERE rownum <= $end) b WHERE rn > $offset";
        }

        return $query;
    }
1148232
public function limit(int $limit, int $offset = null): self
    {
        $this->query['limit'] = ($offset === null)
            ? [abs($limit)] : [abs($limit), abs($offset)];

        return $this;
    }
449737
public function Limit($Limit, $Offset = FALSE) {
      $this->_Limit = $Limit;

      if ($Offset !== FALSE)
         $this->_Offset = $Offset;

      return $this;
   }
505042
public function setRedirectLimit($limit)
    {
        if (!is_int($limit)) {
            throw new InvalidArgumentException('redirectLimit must be an integer.');
        }

        if ($limit < 1) {
            throw new InvalidArgumentException('redirectLimit must be greater than or equal to one.');
        }

        $this->redirectLimit = $limit;

        return $this;
    }
195693
public function setPagination($offset, $limit)
    {
        $this->pagination['offset'] = (Integer) $offset;
        $this->pagination['limit'] = (Integer) $limit;
        return $this;
    }
1348317
public function limit($limit, $page = 1) {
        if($page >= 1) $this->page = $page;
        $this->limit = $limit;

        return $this;
    }
926470
public function limit($limit, $offset = '')
    {
        if (is_null($limit)) {
            throw new \Exception('Empty parameter given to limit clause ');
        }

        if (empty($offset) && !empty($limit)) {
            $this->limitValue = 0;
            $this->offsetValue = intval($limit);
        } else {
            $this->limitValue = intval($limit);
            $this->offsetValue = intval($offset);
        }

        return $this;
    }
88542
final public function limit($limit, $offset = 0)
    {
        $this->_sql['limit'] = $limit;
        $this->offset($offset);
        return $this;
    }
478526
public function setMaxResults($limit)
    {
        $limit = (int)$limit;

        if(0 === $limit) {
            $this->getStatement()->removeClause('limit');
        } else {
            // 
            $this->getStatement()->setClause('limit', new Expr\LimitClause($limit));
        }

        return $this;
    }
1323296
public function limit( $new_limit ) {
		$this->limit = $new_limit;
		if ( false === starts_with( $new_limit . '', ':' ) ) {
			$this->limit = (int) $new_limit;
		}
	}