test_class.declarator: DQL_SQL = "SELECT * FROM table_x"
test_class.modifier: private static final
test_class.original_string: private static final String DQL_SQL = "SELECT * FROM table_x";
test_class.type: String
test_class.var_name: DQL_SQL
test_class.declarator: DML_SQL = "DELETE FROM table_x"
test_class.modifier: private static final
test_class.original_string: private static final String DML_SQL = "DELETE FROM table_x";
test_class.type: String
test_class.var_name: DML_SQL
test_class.declarator: actual
test_class.modifier: private
test_class.original_string: private StatementExecutor actual;
test_class.type: StatementExecutor
test_class.var_name: actual
test_class.file: shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/StatementExecutorTest.java
test_class.identifier: StatementExecutorTest
test_class.superclass: extends AbstractBaseExecutorTest
test_case.body: @Test
      public void assertExecuteQueryForMultipleStatementsSuccess() throws SQLException {
          Statement statement1 = getStatement();
          Statement statement2 = getStatement();
          ResultSet resultSet1 = mock(ResultSet.class);
          ResultSet resultSet2 = mock(ResultSet.class);
          ResultSetMetaData resultSetMetaData = mock(ResultSetMetaData.class);
          when(resultSetMetaData.getColumnName(1)).thenReturn("column");
          when(resultSetMetaData.getColumnLabel(1)).thenReturn("column");
          when(resultSetMetaData.getTableName(1)).thenReturn("table_x");
          when(resultSetMetaData.getColumnCount()).thenReturn(1);
          when(resultSetMetaData.getColumnType(1)).thenReturn(Types.INTEGER);
          when(resultSet1.getMetaData()).thenReturn(resultSetMetaData);
          when(resultSet2.getMetaData()).thenReturn(resultSetMetaData);
          when(resultSet1.getInt(1)).thenReturn(1);
          when(resultSet2.getInt(1)).thenReturn(2);
          when(statement1.executeQuery(DQL_SQL)).thenReturn(resultSet1);
          when(statement2.executeQuery(DQL_SQL)).thenReturn(resultSet2);
          List<QueryResult> result = actual.executeQuery(getExecuteGroups(Arrays.asList(statement1, statement2), true));
          assertThat(String.valueOf(result.get(0).getValue(1, int.class)), is("1"));
          assertThat(String.valueOf(result.get(1).getValue(1, int.class)), is("2"));
          verify(statement1).executeQuery(DQL_SQL);
          verify(statement2).executeQuery(DQL_SQL);
      }
test_case.class_method_signature: StatementExecutorTest.assertExecuteQueryForMultipleStatementsSuccess()
test_case.full_signature: @Test public void assertExecuteQueryForMultipleStatementsSuccess()
test_case.identifier: assertExecuteQueryForMultipleStatementsSuccess
test_case.invocations: getStatement getStatement mock mock mock thenReturn when getColumnName thenReturn when getColumnLabel thenReturn when getTableName thenReturn when getColumnCount thenReturn when getColumnType thenReturn when getMetaData thenReturn when getMetaData thenReturn when getInt thenReturn when getInt thenReturn when executeQuery thenReturn when executeQuery executeQuery getExecuteGroups asList assertThat valueOf getValue get is assertThat valueOf getValue get is executeQuery verify executeQuery verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertExecuteQueryForMultipleStatementsSuccess()
focal_class.file: shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/StatementExecutor.java
focal_class.identifier: StatementExecutor
focal_class.class_method_signature: StatementExecutor.StatementExecutor(final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.full_signature: public  StatementExecutor(final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.identifier: StatementExecutor
focal_class.modifiers: public
focal_class.parameters: (final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.signature:  StatementExecutor(final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.class_method_signature: StatementExecutor.executeQuery(final Collection<InputGroup<StatementExecuteUnit>> inputGroups)
focal_class.full_signature: @Override public List<QueryResult> executeQuery(final Collection<InputGroup<StatementExecuteUnit>> inputGroups)
focal_class.identifier: executeQuery
focal_class.modifiers: @Override public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups)
focal_class.return: List<QueryResult>
focal_class.signature: List<QueryResult> executeQuery(final Collection<InputGroup<StatementExecuteUnit>> inputGroups)
focal_class.class_method_signature: StatementExecutor.executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.full_signature: @Override public int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.identifier: executeUpdate
focal_class.modifiers: @Override public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.return: int
focal_class.signature: int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.class_method_signature: StatementExecutor.executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.full_signature: public int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.identifier: executeUpdate
focal_class.modifiers: public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.return: int
focal_class.signature: int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.class_method_signature: StatementExecutor.executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.full_signature: public int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.identifier: executeUpdate
focal_class.modifiers: public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.return: int
focal_class.signature: int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.class_method_signature: StatementExecutor.executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.full_signature: public int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.identifier: executeUpdate
focal_class.modifiers: public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.return: int
focal_class.signature: int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.class_method_signature: StatementExecutor.executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Updater updater, final SQLStatementContext<?> sqlStatementContext)
focal_class.full_signature: @SuppressWarnings({"unchecked", "rawtypes"}) private int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Updater updater, final SQLStatementContext<?> sqlStatementContext)
focal_class.identifier: executeUpdate
focal_class.modifiers: @SuppressWarnings({"unchecked", "rawtypes"}) private
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Updater updater, final SQLStatementContext<?> sqlStatementContext)
focal_class.return: int
focal_class.signature: int executeUpdate(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Updater updater, final SQLStatementContext<?> sqlStatementContext)
focal_class.class_method_signature: StatementExecutor.execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.full_signature: @Override public boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.return: boolean
focal_class.signature: boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext)
focal_class.class_method_signature: StatementExecutor.execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.full_signature: public boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.identifier: execute
focal_class.modifiers: public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.return: boolean
focal_class.signature: boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int autoGeneratedKeys)
focal_class.class_method_signature: StatementExecutor.execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.full_signature: public boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.identifier: execute
focal_class.modifiers: public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.return: boolean
focal_class.signature: boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final int[] columnIndexes)
focal_class.class_method_signature: StatementExecutor.execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.full_signature: public boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.identifier: execute
focal_class.modifiers: public
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.return: boolean
focal_class.signature: boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final SQLStatementContext<?> sqlStatementContext, final String[] columnNames)
focal_class.class_method_signature: StatementExecutor.execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Executor executor, final SQLStatementContext<?> sqlStatementContext)
focal_class.full_signature: @SuppressWarnings({"unchecked", "rawtypes"}) private boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Executor executor, final SQLStatementContext<?> sqlStatementContext)
focal_class.identifier: execute
focal_class.modifiers: @SuppressWarnings({"unchecked", "rawtypes"}) private
focal_class.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Executor executor, final SQLStatementContext<?> sqlStatementContext)
focal_class.return: boolean
focal_class.signature: boolean execute(final Collection<InputGroup<StatementExecuteUnit>> inputGroups, final Executor executor, final SQLStatementContext<?> sqlStatementContext)
focal_class.superclass: extends AbstractStatementExecutor
focal_method.body: @Override
      public List<QueryResult> executeQuery(final Collection<InputGroup<StatementExecuteUnit>> inputGroups) throws SQLException {
          boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown();
          SQLExecutorCallback<QueryResult> sqlExecutorCallback = new DefaultSQLExecutorCallback<QueryResult>(getSchemaContexts().getDatabaseType(), isExceptionThrown) {
              
              @Override
              protected QueryResult executeSQL(final String sql, final Statement statement, final ConnectionMode connectionMode) throws SQLException {
                  return createQueryResult(sql, statement, connectionMode);
              }
              
              private QueryResult createQueryResult(final String sql, final Statement statement, final ConnectionMode connectionMode) throws SQLException {
                  ResultSet resultSet = statement.executeQuery(sql);
                  return ConnectionMode.MEMORY_STRICTLY == connectionMode ? new StreamQueryResult(resultSet) : new MemoryQueryResult(resultSet);
              }
          };
          return getSqlExecutor().execute(inputGroups, sqlExecutorCallback);
      }
focal_method.class_method_signature: StatementExecutor.executeQuery(final Collection<InputGroup<StatementExecuteUnit>> inputGroups)
focal_method.full_signature: @Override public List<QueryResult> executeQuery(final Collection<InputGroup<StatementExecuteUnit>> inputGroups)
focal_method.identifier: executeQuery
focal_method.invocations: isExceptionThrown getDatabaseType getSchemaContexts createQueryResult executeQuery execute getSqlExecutor
focal_method.modifiers: @Override public
focal_method.parameters: (final Collection<InputGroup<StatementExecuteUnit>> inputGroups)
focal_method.return: List<QueryResult>
focal_method.signature: List<QueryResult> executeQuery(final Collection<InputGroup<StatementExecuteUnit>> inputGroups)