Interface ChunkQueryBuilder<T extends DataCollectionId>
- All Known Implementing Classes:
AbstractChunkQueryBuilder
,DefaultChunkQueryBuilder
,RowValueConstructorChunkQueryBuilder
public interface ChunkQueryBuilder<T extends DataCollectionId>
Builds queries for reading incremental snapshot chunks from a table.
-
Method Summary
Modifier and TypeMethodDescriptionbuildChunkQuery
(IncrementalSnapshotContext<T> context, Table table, int limit, Optional<String> additionalCondition) Builds a query for reading the next incremental snapshot chunk from a table using the specified limit.buildChunkQuery
(IncrementalSnapshotContext<T> context, Table table, Optional<String> additionalCondition) Builds a query for reading the next incremental snapshot chunk from a table using the chunk size configured by the connector.buildMaxPrimaryKeyQuery
(IncrementalSnapshotContext<T> context, Table table, Optional<String> additionalCondition) Builds a query for reading the maximum primary key value from a table.getQueryColumns
(IncrementalSnapshotContext<T> context, Table table) Returns the columns that are used for paginating the incremental snapshot chunks.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.
-
Method Details
-
buildChunkQuery
String buildChunkQuery(IncrementalSnapshotContext<T> context, Table table, Optional<String> additionalCondition) Builds a query for reading the next incremental snapshot chunk from a table using the chunk size configured by the connector. -
buildChunkQuery
String buildChunkQuery(IncrementalSnapshotContext<T> context, Table table, int limit, Optional<String> additionalCondition) Builds a query for reading the next incremental snapshot chunk from a table using the specified limit. -
readTableChunkStatement
PreparedStatement readTableChunkStatement(IncrementalSnapshotContext<T> context, Table table, String sql) throws SQLException Prepares a statement for reading the next incremental snapshot chunk from a table using the SQL statement returned by buildChunkQuery.- Throws:
SQLException
-
buildMaxPrimaryKeyQuery
String buildMaxPrimaryKeyQuery(IncrementalSnapshotContext<T> context, Table table, Optional<String> additionalCondition) Builds a query for reading the maximum primary key value from a table. -
getQueryColumns
Returns the columns that are used for paginating the incremental snapshot chunks.
-