/**
  * 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());
 }
Exemplo n.º 2
0
 private function visitLimitNode(Node\LimitNode $node, SqlBuilder $sqlBuilder)
 {
     $sqlBuilder->setLimit($node->getLimit());
     if ($node->getOffset() !== null) {
         $sqlBuilder->setOffset($node->getOffset());
     }
 }
Exemplo n.º 3
0
 /**
  * @param \Xiag\Rql\Parser\Node\LimitNode $node
  *
  * @author Andreas Glaser
  */
 protected function visitLimit(Node\LimitNode $node)
 {
     $this->qb->setMaxResults($node->getLimit())->setFirstResult($node->getOffset());
 }