Class RowValueConstructorChunkQueryBuilder<T extends DataCollectionId>
java.lang.Object
io.debezium.pipeline.source.snapshot.incremental.AbstractChunkQueryBuilder<T>
io.debezium.pipeline.source.snapshot.incremental.RowValueConstructorChunkQueryBuilder<T>
- All Implemented Interfaces:
ChunkQueryBuilder<T>
public class RowValueConstructorChunkQueryBuilder<T extends DataCollectionId>
extends AbstractChunkQueryBuilder<T>
Builds queries for reading incremental snapshot chunks from a table using row value constructors.
On some database engines, these queries result in the most efficient query plans when a suitable index exists, but are only compatible with databases that support ROW() syntax.
-
Field Summary
Fields inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractChunkQueryBuilder
columnFilter, connectorConfig, jdbcConnection
-
Constructor Summary
ConstructorDescriptionRowValueConstructorChunkQueryBuilder
(RelationalDatabaseConnectorConfig config, JdbcConnection jdbcConnection) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addLowerBound
(IncrementalSnapshotContext<T> context, Table table, Object[] boundaryKey, StringBuilder sql) protected void
addUpperBound
(IncrementalSnapshotContext<T> context, Table table, Object[] boundaryKey, StringBuilder sql) private boolean
fallbackToSuper
(List<Column> pkColumns) readTableChunkStatement
(IncrementalSnapshotContext<T> context, Table table, String sql) Prepares a statement for reading the next incremental snapshot chunk from a table using the SQL statement returned by buildChunkQuery.private void
rowValueComparison
(List<Column> pkColumns, String operator, StringBuilder sql) Methods inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractChunkQueryBuilder
buildChunkQuery, buildChunkQuery, buildMaxPrimaryKeyQuery, buildProjection, getQueryColumns
-
Constructor Details
-
RowValueConstructorChunkQueryBuilder
public RowValueConstructorChunkQueryBuilder(RelationalDatabaseConnectorConfig config, JdbcConnection jdbcConnection)
-
-
Method Details
-
fallbackToSuper
-
rowValueComparison
-
addLowerBound
protected void addLowerBound(IncrementalSnapshotContext<T> context, Table table, Object[] boundaryKey, StringBuilder sql) - Overrides:
addLowerBound
in classAbstractChunkQueryBuilder<T extends DataCollectionId>
-
addUpperBound
protected void addUpperBound(IncrementalSnapshotContext<T> context, Table table, Object[] boundaryKey, StringBuilder sql) - Overrides:
addUpperBound
in classAbstractChunkQueryBuilder<T extends DataCollectionId>
-
readTableChunkStatement
public PreparedStatement readTableChunkStatement(IncrementalSnapshotContext<T> context, Table table, String sql) throws SQLException Description copied from interface:ChunkQueryBuilder
Prepares a statement for reading the next incremental snapshot chunk from a table using the SQL statement returned by buildChunkQuery.- Specified by:
readTableChunkStatement
in interfaceChunkQueryBuilder<T extends DataCollectionId>
- Overrides:
readTableChunkStatement
in classAbstractChunkQueryBuilder<T extends DataCollectionId>
- Throws:
SQLException
-