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()); }
private ICollection <InputGroup <CommandExecuteUnit> > GetExecuteGroups(ICollection <ExecutionUnit> executionUnits) { return(SqlExecutePrepareTemplate.GetExecuteUnitGroups(executionUnits, new CommandGetGroupsSqlExecutePrepareCallback(this))); }