Пример #1
0
 /**
  * This method is currently private in accordance with the rule that
  * factory methods should have no arguments (thus it is easier to determine
  * which nodes are leaf nodes).
  */
 private function addJoin($joinType)
 {
     $from = $this->getChildOfType(QBConstants::NT_FROM);
     $curSource = $from->getChild(QBConstants::NT_SOURCE);
     $src = new SourceJoin($this, $joinType);
     $src->left()->addChild($curSource);
     $from->setChild($src);
     return $src;
 }
Пример #2
0
 protected function walkSourceJoin(SourceJoin $node)
 {
     $left = $this->dispatch($node->getChildOfType(QBConstants::NT_SOURCE_JOIN_LEFT));
     $right = $this->dispatch($node->getChildOfType(QBConstants::NT_SOURCE_JOIN_RIGHT));
     $cond = $this->dispatch($node->getChildOfType(QBConstants::NT_SOURCE_JOIN_CONDITION_FACTORY));
     $join = $this->qomf()->join($left, $right, $node->getJoinType(), $cond);
     return $join;
 }