Exemple #1
0
        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));
        }
Exemple #2
0
        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, "="));
        }
Exemple #4
0
        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"));
        }