Beispiel #1
0
        /// <inheritdoc />
        public override Expression Process(Expression query)
        {
            query = base.Process(query);
            query = new SelectExpressionProjectionApplyingExpressionVisitor(
                ((RelationalQueryCompilationContext)QueryCompilationContext).QuerySplittingBehavior).Visit(query);
#if DEBUG
            query = new TableAliasVerifyingExpressionVisitor().Visit(query);
#endif
            query = new SelectExpressionPruningExpressionVisitor().Visit(query);
            query = new SqlExpressionSimplifyingExpressionVisitor(RelationalDependencies.SqlExpressionFactory, _useRelationalNulls)
                    .Visit(query);
            query = new RelationalValueConverterCompensatingExpressionVisitor(RelationalDependencies.SqlExpressionFactory).Visit(query);

            return(query);
        }
        /// <inheritdoc />
        public override Expression Process(Expression query)
        {
            query = base.Process(query);
            query = new SelectExpressionProjectionApplyingExpressionVisitor().Visit(query);
            query = new CollectionJoinApplyingExpressionVisitor((RelationalQueryCompilationContext)QueryCompilationContext).Visit(query);
            query = new TableAliasUniquifyingExpressionVisitor().Visit(query);
            query = new SelectExpressionPruningExpressionVisitor().Visit(query);
            query = new SqlExpressionSimplifyingExpressionVisitor(RelationalDependencies.SqlExpressionFactory, _useRelationalNulls).Visit(query);
            query = new RelationalValueConverterCompensatingExpressionVisitor(RelationalDependencies.SqlExpressionFactory).Visit(query);

#pragma warning disable 618
            query = OptimizeSqlExpression(query);
#pragma warning restore 618

            return(query);
        }
Beispiel #3
0
    /// <inheritdoc />
    public override Expression Process(Expression query)
    {
        query = base.Process(query);
        query = new SelectExpressionProjectionApplyingExpressionVisitor(
            ((RelationalQueryCompilationContext)QueryCompilationContext).QuerySplittingBehavior).Visit(query);

#if DEBUG
        // Verifies that all SelectExpression are marked as immutable after this point.
        new SelectExpressionMutableVerifyingExpressionVisitor().Visit(query);
        // Verifies that all table aliases are uniquely assigned without skipping over
        // Which points to possible mutation of a SelectExpression being used in multiple places.
        new TableAliasVerifyingExpressionVisitor().Visit(query);
#endif
        query = new SelectExpressionPruningExpressionVisitor().Visit(query);
        query = new SqlExpressionSimplifyingExpressionVisitor(RelationalDependencies.SqlExpressionFactory, _useRelationalNulls)
                .Visit(query);
        query = new RelationalValueConverterCompensatingExpressionVisitor(RelationalDependencies.SqlExpressionFactory).Visit(query);

        return(query);
    }