getCondition() 공개 메소드

public getCondition ( ) : Expression
리턴 Expression
예제 #1
0
 public function visitTernary(O\TernaryExpression $expression)
 {
     $this->walk($expression->getCondition());
     $this->walk($expression->getIfTrue());
     $this->walk($expression->getIfFalse());
     $this->analysis[$expression] = $this->typeSystem->getCommonAncestorType($this->analysis[$expression->hasIfTrue() ? $expression->getIfTrue() : $expression->getCondition()], $this->analysis[$expression->getIfFalse()]);
 }
 protected function visitTernary(O\TernaryExpression $expression)
 {
     $this->sql .= 'CASE WHEN ';
     $this->walk($expression->getCondition());
     $this->sql .= ' THEN ';
     $this->walk($expression->hasIfTrue() ? $expression->getIfTrue() : $expression->getCondition());
     $this->sql .= ' ELSE ';
     $this->walk($expression->getIfFalse());
     $this->sql .= ' END';
 }