private SqlObject ReduceBinary(SqlObject left, SqlObject right) { switch (ExpressionType) { case SqlExpressionType.Add: return(left.Add(right)); case SqlExpressionType.Subtract: return(left.Subtract(right)); case SqlExpressionType.Multiply: return(left.Multiply(right)); case SqlExpressionType.Divide: return(left.Divide(right)); case SqlExpressionType.Modulo: return(left.Modulo(right)); case SqlExpressionType.GreaterThan: return(left.GreaterThan(right)); case SqlExpressionType.GreaterThanOrEqual: return(left.GreaterThanOrEqual(right)); case SqlExpressionType.LessThan: return(left.LessThan(right)); case SqlExpressionType.LessThanOrEqual: return(left.LessOrEqualThan(right)); case SqlExpressionType.Equal: return(left.Equal(right)); case SqlExpressionType.NotEqual: return(left.NotEqual(right)); case SqlExpressionType.Is: return(left.Is(right)); case SqlExpressionType.IsNot: return(left.IsNot(right)); case SqlExpressionType.And: return(left.And(right)); case SqlExpressionType.Or: return(left.Or(right)); case SqlExpressionType.XOr: return(left.XOr(right)); // TODO: ANY and ALL default: throw new SqlExpressionException($"The type {ExpressionType} is not a binary expression or is not supported."); } }