Inheritance: extends Expression
Ejemplo n.º 1
0
 protected function OptimizeBinaryOperationExpression(BinaryOperationExpression $Expression)
 {
     $LeftOperand = $Expression->GetLeftOperandExpression();
     $RightOperand = $Expression->GetRightOperandExpression();
     if ($LeftOperand instanceof ReviveColumnExpression && $this->IsExpressionConstant($RightOperand)) {
         $this->OptimizeReviveColumnCompareConstantExpression($LeftOperand, $RightOperand);
     } else {
         if ($RightOperand instanceof ReviveColumnExpression && $this->IsExpressionConstant($LeftOperand)) {
             $this->OptimizeReviveColumnCompareConstantExpression($RightOperand, $LeftOperand);
         } else {
             return $Expression;
         }
     }
     return Expression::BinaryOperation($LeftOperand, $Expression->GetOperator(), $RightOperand);
 }
Ejemplo n.º 2
0
 public function __construct(array $Expressions, $LogicalOperator = Binary::LogicalAnd)
 {
     $PredicateExpression = null;
     foreach ($Expressions as $Expression) {
         if ($PredicateExpression === null) {
             $PredicateExpression = $Expression;
         } else {
             $PredicateExpression = Expression::BinaryOperation($PredicateExpression, $LogicalOperator, $Expression);
         }
     }
     parent::__construct($PredicateExpression->GetLeftOperandExpression(), $PredicateExpression->GetOperator(), $PredicateExpression->GetRightOperandExpression());
 }
Ejemplo n.º 3
0
 public function __construct(ColumnExpression $AssignToColumnExpression, $AssignmentOperator, CoreExpression $AssignmentValueExpression)
 {
     parent::__construct($AssignToColumnExpression, $AssignmentOperator, $AssignmentValueExpression);
 }
Ejemplo n.º 4
0
 protected function AppendBinaryOperation(QueryBuilder $QueryBuilder, E\BinaryOperationExpression $Expression)
 {
     $this->Append($QueryBuilder, $Expression->GetLeftOperandExpression());
     $QueryBuilder->Append($this->GetBinaryOperatorString($Expression->GetOperator()));
     $this->Append($QueryBuilder, $Expression->GetRightOperandExpression());
 }