Class InsertOrUpdateJdbcExecutor<R,K,V>
- java.lang.Object
-
- org.apache.flink.connector.jdbc.internal.executor.InsertOrUpdateJdbcExecutor<R,K,V>
-
- All Implemented Interfaces:
JdbcBatchStatementExecutor<R>
@Internal public final class InsertOrUpdateJdbcExecutor<R,K,V> extends Object implements JdbcBatchStatementExecutor<R>
Deprecated.This has been replaced withTableInsertOrUpdateStatementExecutorJdbcBatchStatementExecutorthat provides upsert semantics by updating row if it exists and inserting otherwise. Used in Table API.
-
-
Constructor Summary
Constructors Constructor Description InsertOrUpdateJdbcExecutor(String existSQL, String insertSQL, String updateSQL, JdbcStatementBuilder<K> existSetter, JdbcStatementBuilder<V> insertSetter, JdbcStatementBuilder<V> updateSetter, java.util.function.Function<R,K> keyExtractor, java.util.function.Function<R,V> valueExtractor)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddToBatch(R record)Deprecated.voidcloseStatements()Deprecated.Close JDBC related statements.voidexecuteBatch()Deprecated.Submits a batch of commands to the database for execution.voidprepareStatements(Connection connection)Deprecated.Create statements from connection.
-
-
-
Constructor Detail
-
InsertOrUpdateJdbcExecutor
public InsertOrUpdateJdbcExecutor(@Nonnull String existSQL, @Nonnull String insertSQL, @Nonnull String updateSQL, @Nonnull JdbcStatementBuilder<K> existSetter, @Nonnull JdbcStatementBuilder<V> insertSetter, @Nonnull JdbcStatementBuilder<V> updateSetter, @Nonnull java.util.function.Function<R,K> keyExtractor, @Nonnull java.util.function.Function<R,V> valueExtractor)
Deprecated.
-
-
Method Detail
-
prepareStatements
public void prepareStatements(Connection connection) throws SQLException
Deprecated.Description copied from interface:JdbcBatchStatementExecutorCreate statements from connection.- Specified by:
prepareStatementsin interfaceJdbcBatchStatementExecutor<R>- Throws:
SQLException
-
addToBatch
public void addToBatch(R record)
Deprecated.- Specified by:
addToBatchin interfaceJdbcBatchStatementExecutor<R>
-
executeBatch
public void executeBatch() throws SQLExceptionDeprecated.Description copied from interface:JdbcBatchStatementExecutorSubmits a batch of commands to the database for execution.- Specified by:
executeBatchin interfaceJdbcBatchStatementExecutor<R>- Throws:
SQLException
-
closeStatements
public void closeStatements() throws SQLExceptionDeprecated.Description copied from interface:JdbcBatchStatementExecutorClose JDBC related statements.- Specified by:
closeStatementsin interfaceJdbcBatchStatementExecutor<R>- Throws:
SQLException
-
-