Creates and chains a Limit object to limit the number query results.

@param limit The limit expression.
@return The Limit object that represents the LIMIT clause of the query.
326429
@NonNull
    @Override
    public Limit limit(@NonNull Expression limit) {
        if (limit == null) {
            throw new IllegalArgumentException("limit cannot be null.");
        }
        return new Limit(this, limit, null);
    }
1235539
public R setLimit(final int limit){
        mQueryMap.put(FIELD_LIMIT, Integer.toString(limit));
        return (R)this;
    }
488111
def limit(self, limit):
    
    params = join_params(self.parameters, {"limit": limit})

    return self.__class__(**params)
267744
public Integer getLimit() {
    String limitFromRequest =
        uriInfo.getQueryParameters().getFirst(LimitParameter.getDefaultLimitFieldName());

    return limitFromRequest != null ? new LimitParameter(limitFromRequest).getValue()
        : LimitParameter.getDefaultLimit();
  }
853676
public function limit($limit)
    {
        Assertion::integer($limit);
        Assertion::range($limit, 1, 50);

        $this->limit = $limit;

        return $this;
    }
1302362
function setLimit($limit) {
		if (null !== $limit) {
			$limit = (int) $limit;
		}
		$this->limit = $limit;
		return $this;
	}
159486
private void onLimit(StringBuilder builder)
    {
        builder.append(CQLTranslator.LIMIT);
        builder.append(this.maxResult);
    }
791159
public function limit($limit = null, $offset = null)
    {
        $this->results = $this->fetch($limit, $offset);

        return $this->results->fetchAll();
    }
1059195
def limit(self, value):
        
        self._query = self._query.limit(value)

        return self
13084
public function limit($start, $limit = null) {
        if ($limit === null) {
            $limit = intval($start);
            $start = 0;
        } else {
            $start = intval($start);
            $limit = intval($limit);
        }
        if ($start < 0) {
            $start = 0;
        }
        if (!$limit) {
            $limit = 1;
        }
        $this->limit = [$start, $limit];
        if ($this->statement) {
            $this->updateWhereData([':limit_0' => $start, ':limit_1' => $limit]);
        }

        return $this;
    }
186878
public java.util.List<Limit> getLimits() {
        if (limits == null) {
            limits = new com.amazonaws.internal.SdkInternalList<Limit>();
        }
        return limits;
    }
219918
public function limit($limit, $offset = null)
    {
        if ($offset !== null) {
            $this->builder->setFirstResult((int) $offset);
        }

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

        return $this;
    }
1007160
final public static function limitFindBySql (string $sqlQuery, int $limit=0)
	{
		$resultArray = static::findBySql($sqlQuery.static::limitQuery($limit));
		if (empty($resultArray)) return FALSE;
		return ($limit == 1) ? array_shift($resultArray) : $resultArray;
	}
495276
public function setLimit($limit) {
        if (!is_numeric($limit)) {
            $limit = self::DEFAULT_LIMIT;
        }

        if (0 == $limit) {
            // Display ALL Results - No Limit!
            $limit = null;
        }

        $this->limit = $limit;

        return $this;
    }
1231621
private void _buildLimit(
                    final Limit limit,
                    final StringBuilder stmt
                    )
    {
        if (limit == null) {
            return;
        }

        stmt.append( _LIMIT_ );
        stmt.append( limit.getCount() );
        stmt.append( _OFFSET_ );
        stmt.append( limit.getOffset() );
    }
220203
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "limit")
    public JAXBElement<LimitType> createLimit(LimitType value) {
        return new JAXBElement<LimitType>(_Limit_QNAME, LimitType.class, null, value);
    }
236473
public List<T> fetchList(int limit) throws SQLException, InstantiationException, IllegalAccessException {
        ArrayList<T> result = new ArrayList<T>();
        if (primitive) {
            for (int i = 0; i < limit; i++) {
                if (!finished) {
                    result.add(fetchSingleInternal());
                    next();
                } else {
                    break;
                }
            }
        } else {
            for (int i = 0; i < limit; i++) {
                if (!finished) {
                    result.add(fetchSingleInternal());
                    next();
                } else {
                    break;
                }
            }
        }

        return result;
    }