Class LogMinerQueryBuilder
java.lang.Object
io.debezium.connector.oracle.logminer.LogMinerQueryBuilder
A builder that is responsible for producing the query to be executed against the LogMiner view.
- Author:
- Chris Cranford
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringbuild(OracleConnectorConfig connectorConfig) Builds the LogMiner contents view query.private static StringresolveExcludedSchemaPredicate(String fieldName) Resolve the built-in excluded schemas predicate.
-
Field Details
-
LOGMNR_CONTENTS_VIEW
- See Also:
-
-
Constructor Details
-
LogMinerQueryBuilder
public LogMinerQueryBuilder()
-
-
Method Details
-
build
Builds the LogMiner contents view query. The returned query will contain 2 bind parameters that the caller is responsible for binding before executing the query. The first bind parameter is the lower-bounds of the SCN mining window that is not-inclusive while the second is the upper-bounds of the SCN mining window that is inclusive. The built query relies on the following columns from V$LOGMNR_CONTENTS:SCN - the system change number at which the change was made SQL_REDO - the reconstructed SQL statement that initiated the change OPERATION - the database operation type name OPERATION_CODE - the database operation numeric code TIMESTAMP - the time when the change event occurred XID - the transaction identifier the change participated in CSF - the continuation flag, identifies rows that should be processed together as single row, 0=no, 1=yes TABLE_NAME - the name of the table for which the change is for SEG_OWNER - the name of the schema for which the change is for USERNAME - the name of the database user that caused the change ROW_ID - the unique identifier of the row that the change is for, may not always be set with valid value ROLLBACK - the rollback flag, value of 0 or 1. 1 implies the row was rolled back RS_ID - the rollback segment idenifier where the change record was record from- Parameters:
connectorConfig- connector configuration, should not benull- Returns:
- the SQL string to be used to fetch changes from Oracle LogMiner
-
resolveExcludedSchemaPredicate
Resolve the built-in excluded schemas predicate.- Parameters:
fieldName- the query field name the predicate applies to, should never benull- Returns:
- the predicate
-