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 PreparedStatementExecutor actual;
test_class.type: PreparedStatementExecutor
test_class.var_name: actual
test_class.file: shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutorTest.java
test_class.identifier: PreparedStatementExecutorTest
test_class.superclass: extends AbstractBaseExecutorTest
test_case.body: @Test
      public void assertExecuteQueryForMultiplePreparedStatementsSuccess() throws SQLException {
          PreparedStatement preparedStatement1 = getPreparedStatement();
          PreparedStatement preparedStatement2 = getPreparedStatement();
          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(preparedStatement1.executeQuery()).thenReturn(resultSet1);
          when(preparedStatement2.executeQuery()).thenReturn(resultSet2);
          List<QueryResult> result = actual.executeQuery(getExecuteGroups(Arrays.asList(preparedStatement1, preparedStatement2), 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(preparedStatement1).executeQuery();
          verify(preparedStatement2).executeQuery();
      }
test_case.class_method_signature: PreparedStatementExecutorTest.assertExecuteQueryForMultiplePreparedStatementsSuccess()
test_case.full_signature: @Test public void assertExecuteQueryForMultiplePreparedStatementsSuccess()
test_case.identifier: assertExecuteQueryForMultiplePreparedStatementsSuccess
test_case.invocations: getPreparedStatement getPreparedStatement 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 assertExecuteQueryForMultiplePreparedStatementsSuccess()
focal_class.file: shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutor.java
focal_class.identifier: PreparedStatementExecutor
focal_class.class_method_signature: PreparedStatementExecutor.PreparedStatementExecutor(final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.full_signature: public  PreparedStatementExecutor(final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.identifier: PreparedStatementExecutor
focal_class.modifiers: public
focal_class.parameters: (final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.signature:  PreparedStatementExecutor(final Map<String, DataSource> dataSourceMap, final SchemaContexts schemaContexts, final SQLExecutor sqlExecutor)
focal_class.class_method_signature: PreparedStatementExecutor.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: PreparedStatementExecutor.createDefaultSQLExecutorCallbackWithQueryResult(final boolean isExceptionThrown)
focal_class.full_signature: private DefaultSQLExecutorCallback<QueryResult> createDefaultSQLExecutorCallbackWithQueryResult(final boolean isExceptionThrown)
focal_class.identifier: createDefaultSQLExecutorCallbackWithQueryResult
focal_class.modifiers: private
focal_class.parameters: (final boolean isExceptionThrown)
focal_class.return: DefaultSQLExecutorCallback<QueryResult>
focal_class.signature: DefaultSQLExecutorCallback<QueryResult> createDefaultSQLExecutorCallbackWithQueryResult(final boolean isExceptionThrown)
focal_class.class_method_signature: PreparedStatementExecutor.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: PreparedStatementExecutor.createDefaultSQLExecutorCallbackWithInteger(final boolean isExceptionThrown)
focal_class.full_signature: private DefaultSQLExecutorCallback<Integer> createDefaultSQLExecutorCallbackWithInteger(final boolean isExceptionThrown)
focal_class.identifier: createDefaultSQLExecutorCallbackWithInteger
focal_class.modifiers: private
focal_class.parameters: (final boolean isExceptionThrown)
focal_class.return: DefaultSQLExecutorCallback<Integer>
focal_class.signature: DefaultSQLExecutorCallback<Integer> createDefaultSQLExecutorCallbackWithInteger(final boolean isExceptionThrown)
focal_class.class_method_signature: PreparedStatementExecutor.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: PreparedStatementExecutor.createDefaultSQLExecutorCallbackWithBoolean(final boolean isExceptionThrown)
focal_class.full_signature: private DefaultSQLExecutorCallback<Boolean> createDefaultSQLExecutorCallbackWithBoolean(final boolean isExceptionThrown)
focal_class.identifier: createDefaultSQLExecutorCallbackWithBoolean
focal_class.modifiers: private
focal_class.parameters: (final boolean isExceptionThrown)
focal_class.return: DefaultSQLExecutorCallback<Boolean>
focal_class.signature: DefaultSQLExecutorCallback<Boolean> createDefaultSQLExecutorCallbackWithBoolean(final boolean isExceptionThrown)
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 = createDefaultSQLExecutorCallbackWithQueryResult(isExceptionThrown);
          return getSqlExecutor().execute(inputGroups, sqlExecutorCallback);
      }
focal_method.class_method_signature: PreparedStatementExecutor.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 createDefaultSQLExecutorCallbackWithQueryResult 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)