Ejemplo n.º 1
0
        public AbstractCommandExecutor(ShardingConnection shardingConnection)
        {
            this.DatabaseType = shardingConnection.GetRuntimeContext().GetDatabaseType();
            this.Connection   = shardingConnection;
            // int maxConnectionsSizePerQuery = connection.GetRuntimeContext().GetProperties().<Integer>getValue(ConfigurationPropertyKey.MAX_CONNECTIONS_SIZE_PER_QUERY);
            int            maxConnectionsSizePerQuery = 1;
            ExecutorEngine executorEngine             = Connection.GetRuntimeContext().GetExecutorEngine();

            SqlExecutePrepareTemplate = new SqlExecutePrepareTemplate(maxConnectionsSizePerQuery);
            SqlExecuteTemplate        = new SqlExecuteTemplate(executorEngine, Connection.IsHoldTransaction());
        }
Ejemplo n.º 2
0
 private ICollection <InputGroup <CommandExecuteUnit> > GetExecuteGroups(ICollection <ExecutionUnit> executionUnits)
 {
     return(SqlExecutePrepareTemplate.GetExecuteUnitGroups(executionUnits,
                                                           new CommandGetGroupsSqlExecutePrepareCallback(this)));
 }