示例#1
0
 public function visitSelectStatmentNode(SelectStatementNode $node, Collector $collector)
 {
     if ($node->getOffset() && !$node->getLimit()) {
         $node->setLimit(new LimitNode(PHP_INT_MAX));
     }
     return parent::visitSelectStatmentNode($node, $collector);
 }
示例#2
0
 protected function buildSubselect($key, UpdateStatementNode $node) : SelectStatementNode
 {
     $stmt = new SelectStatementNode();
     $core = $stmt->getCores()[0];
     $core->setFrom($node->getRelation());
     $core->setWheres($node->getWheres());
     $core->setProjections([$key]);
     $stmt->setLimit($node->getLimit());
     $stmt->setOrders($node->getOrders());
     return $stmt;
 }