public virtual VfpExpression Visit(VfpLikeExpression expression)
 {
     return(new VfpLikeExpression(expression.ResultType,
                                  expression.Argument.Accept(this),
                                  expression.Pattern.Accept(this),
                                  expression.Escape.Accept(this)));
 }
        public override VfpExpression Visit(VfpLikeExpression expression)
        {
            if (!_canRewrite)
            {
                return(expression);
            }

            return(expression.LikeC());
        }
Exemple #3
0
        public override VfpExpression Visit(VfpLikeExpression expression)
        {
            expression.Argument.Accept(this);
            Write(" LIKE ");
            expression.Pattern.Accept(this);

            if (expression.Escape.ExpressionKind != VfpExpressionKind.Null)
            {
                Write(" ESCAPE ");
                expression.Escape.Accept(this);
            }

            return(expression);
        }
Exemple #4
0
        public override VfpExpression Visit(VfpLikeExpression expression)
        {
            // Check the argument expression to see if it contains a property expression.
            // Don't need to rewrite the expression if the left side already contains a property expression.
            if (PropertyGatherer.Gather(expression.Argument).Any())
            {
                return(expression);
            }

            // Check the pattern expression to see if it has a property expression.
            if (!PropertyGatherer.Gather(expression.Pattern).Any())
            {
                return(expression);
            }

            return(VfpExpressionBuilder.Like(expression.ResultType,
                                             expression.Pattern,
                                             expression.Argument,
                                             expression.Escape));
        }