test_class.declarator: TABLE_NAME = "test_table"
test_class.modifier: private static final
test_class.original_string: private static final String TABLE_NAME = "test_table";
test_class.type: String
test_class.var_name: TABLE_NAME
test_class.declarator: INSERT_SQL = "INSERT INTO test_table (id,user,status) VALUES(?,?,?)"
test_class.modifier: private static final
test_class.original_string: private static final String INSERT_SQL = "INSERT INTO test_table (id,user,status) VALUES(?,?,?)";
test_class.type: String
test_class.var_name: INSERT_SQL
test_class.declarator: DELETE_SQL = "DELETE FROM test_table WHERE id = ? and user = ?"
test_class.modifier: private static final
test_class.original_string: private static final String DELETE_SQL = "DELETE FROM test_table WHERE id = ? and user = ?";
test_class.type: String
test_class.var_name: DELETE_SQL
test_class.declarator: UPDATE_SQL = "UPDATE test_table SET user = ?,status = ? WHERE id = ? and user = ?"
test_class.modifier: private static final
test_class.original_string: private static final String UPDATE_SQL = "UPDATE test_table SET user = ?,status = ? WHERE id = ? and user = ?";
test_class.type: String
test_class.var_name: UPDATE_SQL
test_class.declarator: dataSourceManager
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DataSourceManager dataSourceManager;
test_class.type: DataSourceManager
test_class.var_name: dataSourceManager
test_class.declarator: sqlBuilder
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AbstractSQLBuilder sqlBuilder;
test_class.type: AbstractSQLBuilder
test_class.var_name: sqlBuilder
test_class.declarator: dataSourceConfig
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ScalingDataSourceConfiguration dataSourceConfig;
test_class.type: ScalingDataSourceConfiguration
test_class.var_name: dataSourceConfig
test_class.declarator: channel
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Channel channel;
test_class.type: Channel
test_class.var_name: channel
test_class.declarator: dataSource
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DataSource dataSource;
test_class.type: DataSource
test_class.var_name: dataSource
test_class.declarator: connection
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Connection connection;
test_class.type: Connection
test_class.var_name: connection
test_class.declarator: preparedStatement
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PreparedStatement preparedStatement;
test_class.type: PreparedStatement
test_class.var_name: preparedStatement
test_class.declarator: jdbcImporter
test_class.modifier: private
test_class.original_string: private AbstractJDBCImporter jdbcImporter;
test_class.type: AbstractJDBCImporter
test_class.var_name: jdbcImporter
test_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/execute/executor/importer/AbstractJDBCImporterTest.java
test_class.identifier: AbstractJDBCImporterTest
test_case.body: @Test
      public void assertDeleteDataRecord() throws SQLException {
          DataRecord deleteRecord = getDataRecord("DELETE");
          when(sqlBuilder.buildDeleteSQL(deleteRecord, mockConditionColumns(deleteRecord))).thenReturn(DELETE_SQL);
          when(connection.prepareStatement(DELETE_SQL)).thenReturn(preparedStatement);
          when(channel.fetchRecords(100, 3)).thenReturn(mockRecords(deleteRecord));
          jdbcImporter.run();
          verify(preparedStatement).setObject(1, 1);
          verify(preparedStatement).setObject(2, 10);
          verify(preparedStatement).execute();
      }
test_case.class_method_signature: AbstractJDBCImporterTest.assertDeleteDataRecord()
test_case.full_signature: @Test public void assertDeleteDataRecord()
test_case.identifier: assertDeleteDataRecord
test_case.invocations: getDataRecord thenReturn when buildDeleteSQL mockConditionColumns thenReturn when prepareStatement thenReturn when fetchRecords mockRecords run setObject verify setObject verify execute verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertDeleteDataRecord()
focal_class.declarator: importerConfig
focal_class.modifier: private final
focal_class.original_string: private final ImporterConfiguration importerConfig;
focal_class.type: ImporterConfiguration
focal_class.var_name: importerConfig
focal_class.declarator: dataSourceManager
focal_class.modifier: private final
focal_class.original_string: private final DataSourceManager dataSourceManager;
focal_class.type: DataSourceManager
focal_class.var_name: dataSourceManager
focal_class.declarator: sqlBuilder
focal_class.modifier: private final
focal_class.original_string: private final AbstractSQLBuilder sqlBuilder;
focal_class.type: AbstractSQLBuilder
focal_class.var_name: sqlBuilder
focal_class.declarator: channel
focal_class.modifier: @Setter
      private
focal_class.original_string: @Setter
      private Channel channel;
focal_class.type: Channel
focal_class.var_name: channel
focal_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/execute/executor/importer/AbstractJDBCImporter.java
focal_class.identifier: AbstractJDBCImporter
focal_class.interfaces: implements Importer
focal_class.class_method_signature: AbstractJDBCImporter.AbstractJDBCImporter(final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.full_signature: protected  AbstractJDBCImporter(final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.identifier: AbstractJDBCImporter
focal_class.modifiers: protected
focal_class.parameters: (final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.signature:  AbstractJDBCImporter(final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.class_method_signature: AbstractJDBCImporter.createSQLBuilder()
focal_class.full_signature: protected abstract AbstractSQLBuilder createSQLBuilder()
focal_class.identifier: createSQLBuilder
focal_class.modifiers: protected abstract
focal_class.parameters: ()
focal_class.return: AbstractSQLBuilder
focal_class.signature: AbstractSQLBuilder createSQLBuilder()
focal_class.class_method_signature: AbstractJDBCImporter.start()
focal_class.full_signature: @Override public final void start()
focal_class.identifier: start
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: AbstractJDBCImporter.write()
focal_class.full_signature: @Override public final void write()
focal_class.identifier: write
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void write()
focal_class.class_method_signature: AbstractJDBCImporter.flush(final DataSource dataSource, final List<Record> buffer)
focal_class.full_signature: private void flush(final DataSource dataSource, final List<Record> buffer)
focal_class.identifier: flush
focal_class.modifiers: private
focal_class.parameters: (final DataSource dataSource, final List<Record> buffer)
focal_class.return: void
focal_class.signature: void flush(final DataSource dataSource, final List<Record> buffer)
focal_class.class_method_signature: AbstractJDBCImporter.tryFlush(final DataSource dataSource, final List<Record> buffer)
focal_class.full_signature: private boolean tryFlush(final DataSource dataSource, final List<Record> buffer)
focal_class.identifier: tryFlush
focal_class.modifiers: private
focal_class.parameters: (final DataSource dataSource, final List<Record> buffer)
focal_class.return: boolean
focal_class.signature: boolean tryFlush(final DataSource dataSource, final List<Record> buffer)
focal_class.class_method_signature: AbstractJDBCImporter.doFlush(final DataSource dataSource, final List<Record> buffer)
focal_class.full_signature: private List<Record> doFlush(final DataSource dataSource, final List<Record> buffer)
focal_class.identifier: doFlush
focal_class.modifiers: private
focal_class.parameters: (final DataSource dataSource, final List<Record> buffer)
focal_class.return: List<Record>
focal_class.signature: List<Record> doFlush(final DataSource dataSource, final List<Record> buffer)
focal_class.class_method_signature: AbstractJDBCImporter.execute(final Connection connection, final Record record)
focal_class.full_signature: private void execute(final Connection connection, final Record record)
focal_class.identifier: execute
focal_class.modifiers: private
focal_class.parameters: (final Connection connection, final Record record)
focal_class.return: void
focal_class.signature: void execute(final Connection connection, final Record record)
focal_class.class_method_signature: AbstractJDBCImporter.executeInsert(final Connection connection, final DataRecord record)
focal_class.full_signature: private void executeInsert(final Connection connection, final DataRecord record)
focal_class.identifier: executeInsert
focal_class.modifiers: private
focal_class.parameters: (final Connection connection, final DataRecord record)
focal_class.return: void
focal_class.signature: void executeInsert(final Connection connection, final DataRecord record)
focal_class.class_method_signature: AbstractJDBCImporter.executeUpdate(final Connection connection, final DataRecord record)
focal_class.full_signature: private void executeUpdate(final Connection connection, final DataRecord record)
focal_class.identifier: executeUpdate
focal_class.modifiers: private
focal_class.parameters: (final Connection connection, final DataRecord record)
focal_class.return: void
focal_class.signature: void executeUpdate(final Connection connection, final DataRecord record)
focal_class.class_method_signature: AbstractJDBCImporter.executeDelete(final Connection connection, final DataRecord record)
focal_class.full_signature: private void executeDelete(final Connection connection, final DataRecord record)
focal_class.identifier: executeDelete
focal_class.modifiers: private
focal_class.parameters: (final Connection connection, final DataRecord record)
focal_class.return: void
focal_class.signature: void executeDelete(final Connection connection, final DataRecord record)
focal_class.superclass: extends AbstractShardingScalingExecutor<IncrementalPosition>
focal_method.body: private void execute(final Connection connection, final Record record) throws SQLException {
          if (DataRecord.class.equals(record.getClass())) {
              DataRecord dataRecord = (DataRecord) record;
              switch (dataRecord.getType()) {
                  case ScalingConstant.INSERT:
                      executeInsert(connection, dataRecord);
                      break;
                  case ScalingConstant.UPDATE:
                      executeUpdate(connection, dataRecord);
                      break;
                  case ScalingConstant.DELETE:
                      executeDelete(connection, dataRecord);
                      break;
                  default:
                      break;
              }
          }
      }
focal_method.class_method_signature: AbstractJDBCImporter.execute(final Connection connection, final Record record)
focal_method.full_signature: private void execute(final Connection connection, final Record record)
focal_method.identifier: execute
focal_method.invocations: equals getClass getType executeInsert executeUpdate executeDelete
focal_method.modifiers: private
focal_method.parameters: (final Connection connection, final Record record)
focal_method.return: void
focal_method.signature: void execute(final Connection connection, final Record record)