public abstract class UpsertWriter extends Object implements JDBCWriter
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addRecord(org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row> record)
Add record to writer, the writer may cache the data.
|
void |
close()
Close JDBC related statements and other classes.
|
static UpsertWriter |
create(JDBCDialect dialect,
String tableName,
String[] fieldNames,
int[] fieldTypes,
String[] keyFields) |
void |
executeBatch()
Submits a batch of commands to the database for execution.
|
void |
open(Connection connection)
Open the writer by JDBC Connection.
|
public static UpsertWriter create(JDBCDialect dialect, String tableName, String[] fieldNames, int[] fieldTypes, String[] keyFields)
public void open(Connection connection) throws SQLException
JDBCWriteropen 在接口中 JDBCWriterSQLExceptionpublic void addRecord(org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row> record)
JDBCWriteraddRecord 在接口中 JDBCWriterpublic void executeBatch()
throws SQLException
JDBCWriterexecuteBatch 在接口中 JDBCWriterSQLExceptionpublic void close()
throws SQLException
JDBCWriterclose 在接口中 JDBCWriterSQLExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.