Package io.debezium.relational
Class Selectors.TableSelectionPredicateBuilder
java.lang.Object
io.debezium.relational.Selectors.TableSelectionPredicateBuilder
- Enclosing class:
- Selectors
A builder of a table predicate.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()buildStartingFromDbFilter(Predicate<String> dbFilter, Predicate<String> schemaFilter, Predicate<TableId> tableFilter) buildStartingFromSchemaFilter(Predicate<String> schemaFilter, Predicate<TableId> tableFilter) excludeDatabases(String databaseNames) Specify the names of the databases that should be excluded.excludeSchemas(String schemaNames) Specify the names of the schemas that should be excluded.excludeTables(String fullyQualifiedTableNames) Specify the names of the tables that should be excluded.excludeTables(String fullyQualifiedTableNames, Selectors.TableIdToStringMapper tableIdMapper) Specify the names of the tables that should be excluded.includeDatabases(String databaseNames) Specify the names of the databases that should be included.includeSchemas(String schemaNames) Specify the names of the schemas that should be included.includeTables(String fullyQualifiedTableNames) Specify the names of the tables that should be included.includeTables(String fullyQualifiedTableNames, Selectors.TableIdToStringMapper tableIdMapper) Specify the names of the tables that should be included.
-
Field Details
-
dbInclusions
-
dbExclusions
-
schemaInclusions
-
schemaExclusions
-
tableInclusions
-
tableExclusions
-
-
Constructor Details
-
TableSelectionPredicateBuilder
public TableSelectionPredicateBuilder()
-
-
Method Details
-
includeDatabases
Specify the names of the databases that should be included. This method will override previously included andexcludeddatabases.- Parameters:
databaseNames- the comma-separated list of database names to include; may be null or empty- Returns:
- this builder so that methods can be chained together; never null
-
excludeDatabases
Specify the names of the databases that should be excluded. This method will override previouslyexcludeddatabases, althoughincluding databasesoverrides exclusions.- Parameters:
databaseNames- the comma-separated list of database names to exclude; may be null or empty- Returns:
- this builder so that methods can be chained together; never null
-
includeSchemas
Specify the names of the schemas that should be included. This method will override previously included andexcludedschemas.- Parameters:
schemaNames- the comma-separated list of schema names to include; may be null or empty- Returns:
- this builder so that methods can be chained together; never null
-
excludeSchemas
Specify the names of the schemas that should be excluded. This method will override previouslyexcludedschemas, althoughincludeSchemas(String)including schemas} overrides exclusions.- Parameters:
schemaNames- the comma-separated list of schema names to exclude; may be null or empty- Returns:
- this builder so that methods can be chained together; never null
-
includeTables
public Selectors.TableSelectionPredicateBuilder includeTables(String fullyQualifiedTableNames, Selectors.TableIdToStringMapper tableIdMapper) Specify the names of the tables that should be included. This method will override previously included andexcludedtable names.Note that any specified tables that are in an
excluded databasewill not be included.- Parameters:
fullyQualifiedTableNames- the comma-separated list of fully-qualified table names to include; may be null or emptytableIdMapper- an arbitrary converter used to convert TableId into String for pattern matching. Usually used to remove a component from tableId to simplify patterns.- Returns:
- this builder so that methods can be chained together; never null
-
includeTables
Specify the names of the tables that should be included. This method will override previously included andexcludedtable names.Note that any specified tables that are in an
excluded databasewill not be included.- Parameters:
fullyQualifiedTableNames- the comma-separated list of fully-qualified table names to include; may be null or empty- Returns:
- this builder so that methods can be chained together; never null
-
excludeTables
public Selectors.TableSelectionPredicateBuilder excludeTables(String fullyQualifiedTableNames, Selectors.TableIdToStringMapper tableIdMapper) Specify the names of the tables that should be excluded. This method will override previouslyexcludedtables, althoughincluding tablesoverrides exclusions.Note that any specified tables that are in an
excluded databasewill not be included.- Parameters:
fullyQualifiedTableNames- the comma-separated list of fully-qualified table names to exclude; may be null or emptytableIdMapper- an arbitrary converter used to convert TableId into String for pattern matching. Usually used to remove a component from tableId to simplify patterns.- Returns:
- this builder so that methods can be chained together; never null
-
excludeTables
Specify the names of the tables that should be excluded. This method will override previouslyexcludedtables, althoughincluding tablesoverrides exclusions.Note that any specified tables that are in an
excluded databasewill not be included.- Parameters:
fullyQualifiedTableNames- the comma-separated list of fully-qualified table names to exclude; may be null or empty- Returns:
- this builder so that methods can be chained together; never null
-
build
Build thePredicatethat determines whether a table identified by a givenTableIdis to be included.- Returns:
- the table selection predicate; never null
- See Also:
-
buildStartingFromSchemaFilter
-
buildStartingFromDbFilter
-