public static VfpExpression Rewrite(VfpProviderManifest vfpManifest, VfpExpression expression)
        {
            expression = RedundantCaseExpressionRemover.Remove(expression);

            expression = FlattenFilterRewritter.Rewrite(expression);
            expression = ApplyRewritter.Rewrite(expression);

            expression = InRewritter.Rewrite(expression);
            expression = XmlToCursorRewritter.Rewrite(expression);
            //expression = XmlToCursorMoveToInnerExpressionRewriter.Rewrite(expression);
            expression = XmlToCursorJoinRewriter.Rewrite(expression);

            expression = ComparisonRewritter.Rewrite(expression);
            expression = LikeRewritter.Rewrite(expression);
            expression = LikeCRewritter.Rewrite(expression);
            expression = CaseWithNullRewriter.Rewrite(expression);

            expression = SingleRowTableRewritter.Rewrite(expression);
            expression = MissingOrderByRewritter.Rewrite(expression);
            expression = VariableReferenceRewritter.Rewrite(expression);
            expression = ConstantToParameterRewritter.Rewrite(expression);
            expression = FilterProjectRewritter.Rewrite(expression);

            expression = DecimalPropertyRewritter.Rewrite(vfpManifest, expression);

            return(expression);
        }
        public static VfpExpression Rewrite(VfpExpression expression)
        {
            var rewriter = new SingleRowTableRewritter();

            return(rewriter.Visit(expression));
        }