Class SelectLobParser
- java.lang.Object
-
- io.debezium.connector.oracle.logminer.parser.SelectLobParser
-
@NotThreadSafe public class SelectLobParser extends Object
Simple text-based parser implementation for Oracle LogMiner SEL_LOB_LOCATOR Redo SQL.- Author:
- Chris Cranford
-
-
Field Summary
Fields Modifier and Type Field Description private static StringANDprivate static StringBEGINprivate booleanbinaryprivate static StringBLOB_BUFFERprivate static StringBLOB_LOCATORprivate StringcolumnNameprivate Object[]columnValuesprivate static StringFOR_UPDATEprivate static StringFROMprivate static StringORprivate StringschemaNameprivate static StringSELECTprivate StringtableNameprivate static StringWHERE
-
Constructor Summary
Constructors Constructor Description SelectLobParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetColumnName()booleanisBinary()LogMinerDmlEntryparse(String sql, Table table)Parse the supplied SEL_LOB_LOCATOR event redo SQL statement.private intparseColumnValue(String sql, int index, int columnIndex)private intparseOperator(String sql, int index)private intparseQuotedValue(String sql, int index, Consumer<String> collector)private intparseWhere(String sql, int index, Table table)private voidreset(Table table)
-
-
-
Field Detail
-
BEGIN
private static final String BEGIN
- See Also:
- Constant Field Values
-
SELECT
private static final String SELECT
- See Also:
- Constant Field Values
-
FROM
private static final String FROM
- See Also:
- Constant Field Values
-
WHERE
private static final String WHERE
- See Also:
- Constant Field Values
-
AND
private static final String AND
- See Also:
- Constant Field Values
-
OR
private static final String OR
- See Also:
- Constant Field Values
-
FOR_UPDATE
private static final String FOR_UPDATE
- See Also:
- Constant Field Values
-
BLOB_LOCATOR
private static final String BLOB_LOCATOR
- See Also:
- Constant Field Values
-
BLOB_BUFFER
private static final String BLOB_BUFFER
- See Also:
- Constant Field Values
-
columnName
private String columnName
-
schemaName
private String schemaName
-
tableName
private String tableName
-
binary
private boolean binary
-
columnValues
private Object[] columnValues
-
-
Method Detail
-
parse
public LogMinerDmlEntry parse(String sql, Table table)
Parse the supplied SEL_LOB_LOCATOR event redo SQL statement.- Parameters:
sql- SQL statement expression to be parsedtable- the relational table- Returns:
- instance of
LogMinerDmlEntryfor the parsed fragment.
-
getColumnName
public String getColumnName()
- Returns:
- the column name that the SEL_LOB_LOCATOR event is modifying
-
isBinary
public boolean isBinary()
- Returns:
- true if the column being modified is a BLOB; otherwise false indicates a CLOB data type.
-
parseColumnValue
private int parseColumnValue(String sql, int index, int columnIndex)
-
parseOperator
private int parseOperator(String sql, int index)
-
reset
private void reset(Table table)
-
-