public class DMLTransformer extends Session.AbstractResultSetReader
Session.ResultSetReader that writes the read rows as DML-statements
into the export-script.| Modifier and Type | Class and Description |
|---|---|
static class |
DMLTransformer.Factory
Factory.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
numberOfExportedLOBs
Counts the exported LOBs.
|
protected Quoting |
quoting
For quoting of column names.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DMLTransformer(Table table,
OutputStreamWriter scriptFileWriter,
boolean upsertOnly,
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.
|
protected Quoting |
createQuoting(Session session) |
void |
flush()
Flushes the export-reader.
|
protected String |
qualifiedTableName(Table t)
Gets qualified table name.
|
void |
readCurrentRow(ResultSet resultSet)
Reads result-set and writes into export-script.
|
getCellContentConverter, getMetaDatapublic static long numberOfExportedLOBs
protected final Quoting quoting
protected DMLTransformer(Table table, OutputStreamWriter scriptFileWriter, boolean upsertOnly, 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)upsertOnly - use 'upsert' statements for all entitiessession - the sessiontargetDBMSConfiguration - configuration of the target DBMSexecutionContext - importFilterTransformer2 - SQLExceptionprotected Quoting createQuoting(Session session) throws SQLException
SQLExceptionpublic void readCurrentRow(ResultSet resultSet) throws SQLException
resultSet - the result-setSQLExceptionprotected String convertToSql(CellContentConverter cellContentConverter, ResultSet resultSet, int i, Object content) throws SQLException
cellContentConverter - converterresultSet - points to current rowi - current result set indexcontent - cell contentSQLExceptionprotected String qualifiedTableName(Table t)
t - the tablepublic void flush()
public void close()
close in interface Session.ResultSetReaderclose in class Session.AbstractResultSetReader