public override SqlType GetSqlType(IContext context) { if (ExpressionType.IsRelational()) { return(PrimitiveTypes.Boolean()); } var leftType = Left.GetSqlType(context); var rightType = Right.GetSqlType(context); return(leftType.Wider(rightType)); }
public static bool Matches(this ExpressionType expressionType, OperatorFlags flags) { return((((flags & OperatorFlags.Addition) != 0) && expressionType.IsAddition()) || (((flags & OperatorFlags.Arithmetic) != 0) && expressionType.IsArithmetic()) || (((flags & OperatorFlags.Bitwise) != 0) && expressionType.IsBitwise()) || (((flags & OperatorFlags.Comparison) != 0) && expressionType.IsComparison()) || (((flags & OperatorFlags.Equality) != 0) && expressionType.IsEquality()) || (((flags & OperatorFlags.Logical) != 0) && expressionType.IsLogical()) || (((flags & OperatorFlags.Relational) != 0) && expressionType.IsRelational()) || (((flags & OperatorFlags.Shift) != 0) && expressionType.IsShift()) || (((flags & OperatorFlags.Subtraction) != 0) && expressionType.IsSubtraction())); }