private Expression BuildInner(Expression expression)
        {
            var eb = new DbExecutionBuilder(this.linguist, this.policy, this.executor)
            {
                scope           = this.scope,
                receivingMember = this.receivingMember,
                nReaders        = this.nReaders,
                nLookup         = this.nLookup,
                variableMap     = this.variableMap
            };

            return(eb.Build(expression));
        }
        public static Expression Build(QueryLinguist linguist, QueryPolicy policy, Expression expression, Expression provider)
        {
            var executor = Expression.Parameter(typeof(QueryExecutor), "executor");
            var builder  = new DbExecutionBuilder(linguist, policy, executor);

            if (builder != null)
            {
                builder.variables.Add(executor);
                builder.initializers.Add(Expression.Call(Expression.Convert(provider, typeof(ICreateExecutor)), nameof(ICreateExecutor.CreateExecutor), null, null));
            }

            return(builder.Build(expression));
        }
Esempio n. 3
0
 public virtual Expression BuildExecutionPlan(Expression query, Expression provider)
 {
     return(DbExecutionBuilder.Build(this.Translator.Linguist, this.Policy, query, provider));
 }