private string NotEqualExpressionToWhereClause(SimpleExpression expression) { if (expression.RightOperand == null) { return(string.Format("{0} {1}", FormatObject(expression.LeftOperand, null), Operators.IsNotNull)); } if (CommonTypes.Contains(expression.RightOperand.GetType())) { return(FormatAsComparison(expression, Operators.NotEqual)); } return(FormatAsComparison(expression, Operators.NotEqual)); }
private string NotEqualExpressionToWhereClause(SimpleExpression expression) { if (expression.RightOperand == null) { return(FormatAsComparison(expression, "ne")); } if (CommonTypes.Contains(expression.RightOperand.GetType())) { return(FormatAsComparison(expression, "ne")); } return(FormatAsComparison(expression, "ne")); }
private string EqualExpressionToWhereClause(SimpleExpression expression) { if (expression.RightOperand == null) { return(string.Format("{0} IS NULL", FormatObject(expression.LeftOperand, null))); } if (CommonTypes.Contains(expression.RightOperand.GetType())) { return(FormatAsComparison(expression, "=")); } return(FormatAsComparison(expression, "=")); }
private string EqualExpressionToWhereClause(SimpleExpression expression) { if (expression.RightOperand == null) { return(FormatAsComparison(expression, "eq")); } if (CommonTypes.Contains(expression.RightOperand.GetType())) { return(FormatAsComparison(expression, "eq")); } return(TryFormatAsRange(expression.LeftOperand, expression.RightOperand as IRange) ?? FormatAsComparison(expression, "eq")); }