Initiales the query limit

@return int
976004
protected function initQueryLimit()
    {
        $url = $this->getBaseUrl(true) . 'accounts/self/capabilities?format=JSON';
        $response = $this->getConnector()->get($url);
        $response = $this->verifyResult($response, $url);

        $content = $this->transformJsonResponse($response->getContent());

        return $content['queryLimit']['max'];
    }
699782
private function buildLimit() {
        $this->getCriteria()->limit($this->getIndexCriteria()->getLimit(), $this->getIndexCriteria()->getOffset());
    }
1131750
def __buildLimit(self, query ,limitResMax):
        """"""
        limit = query._getParameters()['limit']
        if limitResMax>0 and limitResMax < limit:
            query = UpdateParameter(query, 'limit', limitResMax)
            query = UpdateParameter(query, 'nocount', 'true')        
        elif  limitResMax>0 and  limitResMax >= limit:
            query = UpdateParameter(query, 'nocount', 'true')
        return query
331115
private function calculatePageLimitAndOffset()
    {
        $pageUri = '';
        $pageUri = Url::segment(3);
        $pageNumber = ($pageUri !== '') ? $pageUri : 0;

        if ($pageNumber) {
            //calculate starting point of pagination
            $start = ($this->getPageNumber() - 1) * $this->perPage;
        } else {
            $start = 0; //set start to 0 by default.
        }

        $this->setPageNumber($pageNumber);
        $this->setPaginationOffset($start);
    }
1226043
public function getLimit(array $query = [])
    {
        if (isset($query['limit']) && is_numeric($query['limit']) && in_array($query['limit'], self::$limits)) {
            return (int) $query['limit'];
        }

        return self::DEFAULT_LIMIT;
    }
671138
public function one()
    {
        $currentLimit = $this->limit;
        $results = $this->limit(1)->all();
        $this->limit = $currentLimit;

        return $results ? array_shift($results) : null;
    }
1061158
public function checkCurrentApiLimit(): int
    {
        $limit = $this->responseHeaders['X-Shopify-Shop-Api-Call-Limit'] ??
                 $this->responseHeaders['HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT'] ?? ['1/40'];

        return (int)explode('/', $limit[0])[0];
    }
847041
public function resetQuery()
    {
        $this->_field_list = array(self::DEFAULT_FIELD);
        $this->_param_list = array();
        $this->_limit      = array(self::DEFAULT_LIMIT);
        $this->_where_list = array();

        return $this;
    }
254865
public function getSingleResult()
    {
        $originalLimit = $this->limit;
        $originalUseIdentifierKeys = $this->useIdentifierKeys;

        $this->reset();
        $this->limit(1);
        $this->setUseIdentifierKeys(false);

        $result = current($this->toArray()) ?: null;

        $this->reset();
        $this->limit($originalLimit);
        $this->setUseIdentifierKeys($originalUseIdentifierKeys);

        return $result;
    }
977954
public function newQuery()
    {
        $this->orderBys = [];
        $this->limit = null;
        $this->offset = null;

        return $this->freshQueryBuilder();
    }
1013663
private function setLimit()
    {
        if (isset($this->requestParams['start']) && -1 != $this->requestParams['length']) {
            $this->qb->setFirstResult($this->requestParams['start'])->setMaxResults($this->requestParams['length']);
        }

        return $this;
    }
282562
protected function _limit()
	{
		$limit = $this->getLimit();
		if ($limit !== null) {
			$i = 0;
			$_tagsArray = array();
			foreach ($this->_tagsArray as $key => $value) {
				if ($i < $limit) {
					$_tagsArray[$value['tag']] = $value;
				}
				$i++;
			}
			$this->_tagsArray = array();
			$this->_tagsArray = $_tagsArray;
		}
		return $this->_tagsArray;
	}
1186216
private function rowLimiter(int $limit = 1000): Closure
    {
        return static function () use ($limit): void {
            static $n = 0;

            if (++$n > $limit) {
                $message = I18N::translate('The search returned too many results.');

                throw new InternalServerErrorException($message);
            }
        };
    }
349508
function createQueryWithLimit() {
            // We query only limit number in case of big table
            // If we query with more than million data query will hang up
            const query = _this.initQuery(namespace);
            if (ancestors) {
                query.hasAncestor(_this.gstore.ds.key(ancestors.slice()));
            }
            query.select('__key__');
            query.limit(limitDataPerQuery);

            return query;
        }
606231
protected function _initQuery()
    {
        //pusty where - inicjalizacja
        if ($this->_query->getQueryCompile()->where == '') {
            return $this->_query->getQueryCompile()->where = 'WHERE ';
        }
        //dodawanie operatora logicznego
        $this->_query->getQueryCompile()->where .= ' ' . $this->_logic . ' ';
    }
576796
private function buildLimit() {
        $limit = $this->getRequest()->getQuery('count', 'int', $this->getApiConfig()->getIndexDefaultLimit());
        if($limit < 1) {
            $limit = 1;
        }
        $maxLimit = $this->getApiConfig()->getIndexMaxLimit();
        if($limit > $maxLimit) {
            $limit = $maxLimit;
        }
        $this->setLimit($limit);
    }
1323296
public function limit( $new_limit ) {
		$this->limit = $new_limit;
		if ( false === starts_with( $new_limit . '', ':' ) ) {
			$this->limit = (int) $new_limit;
		}
	}