Source:
<code>public List<SinkRecord> add(SinkRecord record) throws SQLException { final List<SinkRecord> flushed = new ArrayList<>(); boolean schemaChanged = false; if (!Objects.equals(keySchema, record.keySchema())) { keySchema = record.keySchema(); schemaChanged = true; } if (isNull(record.valueSchema())) { if (config.deleteEnabled) { deletesInBatch = true; } } else if (Objects.equals(valueSchema, record.valueSchema())) { if (config.deleteEnabled && deletesInBatch) { flushed.addAll(flush()); } } else { valueSchema = record.valueSchema(); schemaChanged = true; } if (schemaChanged) { flushed.addAll(flush()); final SchemaPair schemaPair = new SchemaPair( record.keySchema(), record.valueSchema() ); fieldsMetadata = FieldsMetadata.extract( tableId.tableName(), config.pkMode, config.pkFields, config.fieldsWhitelist, schemaPair ); dbStructure.createOrAmendIfNecessary( config, connection, tableId, fieldsMetadata ); final String insertSql = getInsertSql(); final String deleteSql = getDeleteSql(); log.debug( "{} sql: deleteSql: meta: {}", config.insertMode, insertSql, deleteSql, fieldsMetadata ); close(); <START> updatePreparedStatement = connection.prepareStatement(insertSql); <END> updateStatementBinder = dbDialect.statementBinder( updatePreparedStatement, config.pkMode, schemaPair, fieldsMetadata, config.insertMode ); if (config.deleteEnabled && nonNull(deleteSql)) { deletePreparedStatement = connection.prepareStatement(deleteSql); deleteStatementBinder = dbDialect.statementBinder( deletePreparedStatement, config.pkMode, schemaPair, fieldsMetadata, config.insertMode ); } } records.add(record); if (records.size() >= config.batchSize) { flushed.addAll(flush()); } return flushed; }</code><technical_language>is [dbDialect.createPreparedStatement(...)](<LINK_0>, basically similar. benefit of dialect, however, is dialect logs operation concrete dialects override behavior</technical_language>

Target:
public List<SinkRecord> add(SinkRecord record) throws SQLException { final List<SinkRecord> flushed = new ArrayList<>(); boolean schemaChanged = false; if (!Objects.equals(keySchema, record.keySchema())) { keySchema = record.keySchema(); schemaChanged = true; } if (isNull(record.valueSchema())) { if (config.deleteEnabled) { deletesInBatch = true; } } else if (Objects.equals(valueSchema, record.valueSchema())) { if (config.deleteEnabled && deletesInBatch) { flushed.addAll(flush()); } } else { valueSchema = record.valueSchema(); schemaChanged = true; } if (schemaChanged) { flushed.addAll(flush()); final SchemaPair schemaPair = new SchemaPair( record.keySchema(), record.valueSchema() ); fieldsMetadata = FieldsMetadata.extract( tableId.tableName(), config.pkMode, config.pkFields, config.fieldsWhitelist, schemaPair ); dbStructure.createOrAmendIfNecessary( config, connection, tableId, fieldsMetadata ); final String insertSql = getInsertSql(); final String deleteSql = getDeleteSql(); log.debug( "{} sql: deleteSql: meta: {}", config.insertMode, insertSql, deleteSql, fieldsMetadata ); close(); updatePreparedStatement = dbDialect.createPreparedStatement(connection, insertSql); updateStatementBinder = dbDialect.statementBinder( updatePreparedStatement, config.pkMode, schemaPair, fieldsMetadata, config.insertMode ); if (config.deleteEnabled && nonNull(deleteSql)) { deletePreparedStatement = dbDialect.createPreparedStatement(connection, deleteSql); deleteStatementBinder = dbDialect.statementBinder( deletePreparedStatement, config.pkMode, schemaPair, fieldsMetadata, config.insertMode ); } } records.add(record); if (records.size() >= config.batchSize) { flushed.addAll(flush()); } return flushed; }