Exemplo n.º 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)), nameof(ICreateExecutor.CreateExecutor), null, null));
            var result = builder.Build(expression);

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