/** * add limit condition to builder * * @param \Xiag\Rql\Parser\Node\LimitNode $node limit node * * @return void */ protected function visitLimit(\Xiag\Rql\Parser\Node\LimitNode $node) { $this->builder->limit($node->getLimit())->skip($node->getOffset()); }
private function visitLimitNode(Node\LimitNode $node, SqlBuilder $sqlBuilder) { $sqlBuilder->setLimit($node->getLimit()); if ($node->getOffset() !== null) { $sqlBuilder->setOffset($node->getOffset()); } }
/** * @param \Xiag\Rql\Parser\Node\LimitNode $node * * @author Andreas Glaser */ protected function visitLimit(Node\LimitNode $node) { $this->qb->setMaxResults($node->getLimit())->setFirstResult($node->getOffset()); }