private DbExecutionBuilder(QueryLinguist linguist, QueryPolicy policy, Expression executor)
 {
     this.linguist     = linguist;
     this.policy       = policy;
     this.executor     = executor;
     this.variables    = new List <ParameterExpression>();
     this.initializers = new List <Expression>();
     this.variableMap  = new Dictionary <string, Expression>();
 }
Esempio n. 2
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);
        }
Esempio n. 3
0
 public override DbEntityProvider New(DbConnection connection, QueryMapping mapping, QueryPolicy policy)
 {
     return new SqlQueryProvider((SqlConnection)connection, mapping, policy);
 }
Esempio n. 4
0
 public SqlQueryProvider(SqlConnection connection, QueryMapping mapping, QueryPolicy policy)
     : base(connection, TSqlLanguage.Default, mapping, policy)
 {
 }
 private ClientJoinedProjectionRewriter(QueryPolicy policy, QueryLanguage language)
 {
     this.policy   = policy;
     this.language = language;
 }
 public static Expression Rewrite(QueryPolicy policy, QueryLanguage language, Expression expression)
 {
     return(new DbClientJoinedRewriter(policy, language).Visit(expression));
 }
Esempio n. 7
0
 /// <summary>
 /// Construct a new <see cref="QueryPolice"/> instance.
 /// </summary>
 public QueryPolice(QueryPolicy policy, QueryTranslator translator)
 {
     this.Policy     = policy;
     this.Translator = translator;
 }
Esempio n. 8
0
 private DbRelationshipIncluder(QueryMapper mapper)
 {
     this.mapper       = mapper;
     this.policy       = mapper.Translator.Police.Policy;
     this.includeScope = new ScopedDictionary <MemberInfo, bool>(null);
 }
 public OracleQueryProvider(DbConnection connection, QueryMapping mapping, QueryPolicy policy)
     : base(connection, mapping, policy)
 {
 }
Esempio n. 10
0
 public DeveelDbProvider(IQuery context, QueryMapping mapping, QueryPolicy policy)
     : base(new DeveelDbLanguage(), mapping, policy)
 {
     this.context = context;
 }
Esempio n. 11
0
 public VfpQueryPolice(QueryPolicy policy, QueryTranslator translator)
     : base(policy, translator)
 {
 }
Esempio n. 12
0
 public SQLiteQueryProvider(SQLiteConnection connection, QueryMapping mapping, QueryPolicy policy)
     : base(connection, SQLiteLanguage.Default, mapping, policy)
 {
 }
 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;
 }
Esempio n. 15
0
 private RelationshipIncluder(QueryMapper mapper)
 {
     this.mapper = mapper;
     this.policy = mapper.Translator.Police.Policy;
 }
Esempio n. 16
0
 public AccessQueryProvider(OleDbConnection connection, QueryMapping mapping, QueryPolicy policy)
     : base(connection, AccessLanguage.Default, mapping, policy)
 {
 }
 private DbClientJoinedRewriter(QueryPolicy policy, QueryLanguage language)
 {
     this.policy   = policy;
     this.language = language;
 }
Esempio n. 18
0
 public QueryTranslator(QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
 {
     this.linguist = language.CreateLinguist(this);
     this.mapper = mapping.CreateMapper(this);
     this.police = policy.CreatePolice(this);
 }
Esempio n. 19
0
 public QueryPolice(QueryPolicy policy, QueryTranslator translator)
 {
     this._policy = policy;
     this._translator = translator;
 }
 private RelationshipIncluder(QueryMapper mapper)
 {
     this.mapper = mapper;
     this.policy = mapper.Translator.Police.Policy;
 }
Esempio n. 21
0
 private ExecutionBuilder(QueryLinguist linguist, QueryPolicy policy, Expression executor)
 {
     this.linguist = linguist;
     this.policy   = policy;
     this.executor = executor;
 }
Esempio n. 22
0
 public OleDbQueryProvider(OleDbConnection connection, QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
     : base(connection, language, mapping, policy)
 {
 }
Esempio n. 23
0
 public QueryTranslator(QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
 {
     this.Linguist = language.CreateLinguist(this);
     this.Mapper   = mapping.CreateMapper(this);
     this.Police   = policy.CreatePolice(this);
 }
 //bool? allowMulitpleActiveResultSets;
 public OracleEntityProvider(DbConnection connection, QueryMapping mapping, QueryPolicy policy)
     : base(connection, PLSqlLanguage.Default, mapping, policy)
 {
 }