예제 #1
0
 /**
  * Add when expression
  *
  * @param string|ExpressionInterface $expression
  * @param string|ExpressionInterface $thenExpression
  *
  * @return $this
  */
 public function when($expression, $thenExpression)
 {
     $this->whenThenExpressions[] = ['WHEN' => $expression, 'THEN' => $thenExpression];
     if ($expression instanceof ExpressionInterface) {
         $this->pushParams($expression->getParams());
     }
     if ($thenExpression instanceof ExpressionInterface) {
         $this->pushParams($thenExpression->getParams());
     }
     return $this;
 }
예제 #2
0
 public function assertExpr($compiled, ExpressionInterface $expr)
 {
     $this->assertSame($compiled, $expr->compile(Mock::getMysqliDriver($this)));
 }