예제 #1
0
 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>();
 }
예제 #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);
        }
예제 #3
0
 public override DbEntityProvider New(DbConnection connection, QueryMapping mapping, QueryPolicy policy)
 {
     return new SqlQueryProvider((SqlConnection)connection, mapping, policy);
 }
예제 #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));
 }
예제 #7
0
 /// <summary>
 /// Construct a new <see cref="QueryPolice"/> instance.
 /// </summary>
 public QueryPolice(QueryPolicy policy, QueryTranslator translator)
 {
     this.Policy     = policy;
     this.Translator = translator;
 }
예제 #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)
 {
 }
예제 #10
0
 public DeveelDbProvider(IQuery context, QueryMapping mapping, QueryPolicy policy)
     : base(new DeveelDbLanguage(), mapping, policy)
 {
     this.context = context;
 }
예제 #11
0
 public VfpQueryPolice(QueryPolicy policy, QueryTranslator translator)
     : base(policy, translator)
 {
 }
예제 #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;
 }
예제 #15
0
 private RelationshipIncluder(QueryMapper mapper)
 {
     this.mapper = mapper;
     this.policy = mapper.Translator.Police.Policy;
 }
예제 #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;
 }
예제 #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);
 }
예제 #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;
 }
예제 #21
0
 private ExecutionBuilder(QueryLinguist linguist, QueryPolicy policy, Expression executor)
 {
     this.linguist = linguist;
     this.policy   = policy;
     this.executor = executor;
 }
예제 #22
0
 public OleDbQueryProvider(OleDbConnection connection, QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
     : base(connection, language, mapping, policy)
 {
 }
예제 #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)
 {
 }