Tabnine Logo
SQLExecuteTemplate.executeGroup
Code IndexAdd Tabnine to your IDE (free)

How to use
executeGroup
method
in
org.apache.shardingsphere.core.executor.sql.execute.SQLExecuteTemplate

Best Java code snippets using org.apache.shardingsphere.core.executor.sql.execute.SQLExecuteTemplate.executeGroup (Showing top 4 results out of 315)

origin: apache/incubator-shardingsphere

/**
 * Execute group.
 *
 * @param sqlExecuteGroups SQL execute groups
 * @param callback SQL execute callback
 * @param <T> class type of return value
 * @return execute result
 * @throws SQLException SQL exception
 */
public <T> List<T> executeGroup(final Collection<ShardingExecuteGroup<? extends StatementExecuteUnit>> sqlExecuteGroups, final SQLExecuteCallback<T> callback) throws SQLException {
  return executeGroup(sqlExecuteGroups, null, callback);
}

origin: apache/incubator-shardingsphere

@SuppressWarnings("unchecked")
protected final <T> List<T> executeCallback(final SQLExecuteCallback<T> executeCallback) throws SQLException {
  return sqlExecuteTemplate.executeGroup((Collection) executeGroups, executeCallback);
}

origin: apache/incubator-shardingsphere

@SuppressWarnings("unchecked")
@Override
public ExecuteResponse execute(final SQLRouteResult routeResult) throws SQLException {
  boolean isReturnGeneratedKeys = routeResult.getSqlStatement() instanceof InsertStatement;
  boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown();
  Collection<ShardingExecuteGroup<StatementExecuteUnit>> sqlExecuteGroups =
      sqlExecutePrepareTemplate.getExecuteUnitGroups(routeResult.getRouteUnits(), new ProxyJDBCExecutePrepareCallback(isReturnGeneratedKeys));
  SQLExecuteCallback<ExecuteResponseUnit> firstProxySQLExecuteCallback = new FirstProxyJDBCExecuteCallback(isExceptionThrown, isReturnGeneratedKeys);
  SQLExecuteCallback<ExecuteResponseUnit> proxySQLExecuteCallback = new ProxyJDBCExecuteCallback(isExceptionThrown, isReturnGeneratedKeys);
  Collection<ExecuteResponseUnit> executeResponseUnits = sqlExecuteTemplate.executeGroup((Collection) sqlExecuteGroups,
      firstProxySQLExecuteCallback, proxySQLExecuteCallback);
  ExecuteResponseUnit firstExecuteResponseUnit = executeResponseUnits.iterator().next();
  return firstExecuteResponseUnit instanceof ExecuteQueryResponseUnit
      ? getExecuteQueryResponse(((ExecuteQueryResponseUnit) firstExecuteResponseUnit).getQueryResponsePackets(), executeResponseUnits) : new ExecuteUpdateResponse(executeResponseUnits);
}

origin: apache/incubator-shardingsphere

@SuppressWarnings("unchecked")
@Override
public ExecuteResponse execute(final SQLRouteResult routeResult) throws SQLException {
  boolean isReturnGeneratedKeys = routeResult.getSqlStatement() instanceof InsertStatement;
  boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown();
  Collection<ShardingExecuteGroup<StatementExecuteUnit>> sqlExecuteGroups =
    sqlExecutePrepareTemplate.getExecuteUnitGroups(routeResult.getRouteUnits(), new ProxyJDBCExecutePrepareCallback(isReturnGeneratedKeys));
  SQLExecuteCallback<ExecuteResponseUnit> firstProxySQLExecuteCallback = new FirstProxyJDBCExecuteCallback(isExceptionThrown, isReturnGeneratedKeys);
  SQLExecuteCallback<ExecuteResponseUnit> proxySQLExecuteCallback = new ProxyJDBCExecuteCallback(isExceptionThrown, isReturnGeneratedKeys);
  Collection<ExecuteResponseUnit> executeResponseUnits = sqlExecuteTemplate.executeGroup((Collection) sqlExecuteGroups,
    firstProxySQLExecuteCallback, proxySQLExecuteCallback);
  ExecuteResponseUnit firstExecuteResponseUnit = executeResponseUnits.iterator().next();
  return firstExecuteResponseUnit instanceof ExecuteQueryResponseUnit
    ? getExecuteQueryResponse(((ExecuteQueryResponseUnit) firstExecuteResponseUnit).getPostgreSQLQueryResponsePackets(), executeResponseUnits)
    : new ExecuteUpdateResponse(executeResponseUnits);
}

org.apache.shardingsphere.core.executor.sql.executeSQLExecuteTemplateexecuteGroup

Javadoc

Execute group.

Popular methods of SQLExecuteTemplate

  • <init>

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JComboBox (javax.swing)
  • JTextField (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now