Beispiel #1
0
        public static Expression Build(QueryLinguist linguist, QueryPolicy policy, Expression expression, Expression provider)
        {
            var executor = Expression.Parameter(typeof(QueryExecutor), "executor");
            var builder  = new ExecutionBuilder(linguist, policy, executor);

            builder.variables.Add(executor);
            builder.initializers.Add(Expression.Call(Expression.Convert(provider, typeof(ICreateExecutor)), "CreateExecutor", null, null));
            var result = builder.Build(expression);

            return(result);
        }
 private RelationshipIncluder(QueryMapper mapper)
 {
     this.mapper = mapper;
     this.policy = mapper.Translator.Police.Policy;
 }
Beispiel #3
0
 public static Expression Rewrite(QueryPolicy policy, QueryLanguage language, Expression expression)
 {
     return(new ClientJoinedProjectionRewriter(policy, language).Visit(expression));
 }
Beispiel #4
0
 private ClientJoinedProjectionRewriter(QueryPolicy policy, QueryLanguage language)
 {
     this.policy   = policy;
     this.language = language;
 }
Beispiel #5
0
 private ExecutionBuilder(QueryLinguist linguist, QueryPolicy policy, Expression executor)
 {
     this.linguist = linguist;
     this.policy   = policy;
     this.executor = executor;
 }
Beispiel #6
0
 public QueryTranslator(QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
 {
     this.linguist = language.CreateLinguist(this);
     this.mapper   = mapping.CreateMapper(this);
     this.police   = policy.CreatePolice(this);
 }
Beispiel #7
0
 public QueryPolice(QueryPolicy policy, QueryTranslator translator)
 {
     this.policy     = policy;
     this.translator = translator;
 }