public class UpdateTransformer extends Session.AbstractResultSetReader
Session.ResultSetReader that writes the read rows as UPDATE statements
into the export-script.| Constructor and Description |
|---|
UpdateTransformer(Table table,
Set<Column> columns,
OutputStreamWriter scriptFileWriter,
int maxBodySize,
Session session,
DBMS targetDBMSConfiguration,
ImportFilterTransformer importFilterTransformer,
ExecutionContext executionContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Flushes the export-reader.
|
protected String |
convertToSql(CellContentConverter cellContentConverter,
ResultSet resultSet,
int i,
Object content)
Converts cell content to SQL literals.
|
void |
flush()
Flushes the export-reader.
|
void |
readCurrentRow(ResultSet resultSet)
Reads result-set and writes into export-script.
|
getCellContentConverter, getMetaDatapublic UpdateTransformer(Table table, Set<Column> columns, OutputStreamWriter scriptFileWriter, int maxBodySize, Session session, DBMS targetDBMSConfiguration, ImportFilterTransformer importFilterTransformer, ExecutionContext executionContext) throws SQLException
table - the table to read fromscriptFileWriter - the file to write tomaxBodySize - maximum length of SQL values list (for generated inserts)session - the sessiontargetDBMSConfiguration - configuration of the target DBMSSQLExceptionprotected String convertToSql(CellContentConverter cellContentConverter, ResultSet resultSet, int i, Object content) throws SQLException
cellContentConverter - converterresultSet - points to current rowi - current result set indexcontent - cell contentSQLExceptionpublic void readCurrentRow(ResultSet resultSet) throws SQLException
resultSet - the result-setSQLExceptionpublic void flush()
public void close()
close in interface Session.ResultSetReaderclose in class Session.AbstractResultSetReader