Package io.debezium.relational
Class Selectors.TableSelectionPredicateBuilder
- java.lang.Object
-
- io.debezium.relational.Selectors.TableSelectionPredicateBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private Predicate<String>
dbExclusions
private Predicate<String>
dbInclusions
private Predicate<String>
schemaExclusions
private Predicate<String>
schemaInclusions
private Predicate<TableId>
tableExclusions
private Predicate<TableId>
tableInclusions
-
Constructor Summary
Constructors Constructor Description TableSelectionPredicateBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<TableId>
build()
private Predicate<TableId>
buildStartingFromDbFilter(Predicate<String> dbFilter, Predicate<String> schemaFilter, Predicate<TableId> tableFilter)
private Predicate<TableId>
buildStartingFromSchemaFilter(Predicate<String> schemaFilter, Predicate<TableId> tableFilter)
Selectors.TableSelectionPredicateBuilder
excludeDatabases(String databaseNames)
Specify the names of the databases that should be excluded.Selectors.TableSelectionPredicateBuilder
excludeSchemas(String schemaNames)
Specify the names of the schemas that should be excluded.Selectors.TableSelectionPredicateBuilder
excludeTables(String fullyQualifiedTableNames)
Specify the names of the tables that should be excluded.Selectors.TableSelectionPredicateBuilder
excludeTables(String fullyQualifiedTableNames, Selectors.TableIdToStringMapper tableIdMapper)
Specify the names of the tables that should be excluded.Selectors.TableSelectionPredicateBuilder
includeDatabases(String databaseNames)
Specify the names of the databases that should be included.Selectors.TableSelectionPredicateBuilder
includeSchemas(String schemaNames)
Specify the names of the schemas that should be included.Selectors.TableSelectionPredicateBuilder
includeTables(String fullyQualifiedTableNames)
Specify the names of the tables that should be included.Selectors.TableSelectionPredicateBuilder
includeTables(String fullyQualifiedTableNames, Selectors.TableIdToStringMapper tableIdMapper)
Specify the names of the tables that should be included.
-
-
-
Method Detail
-
includeDatabases
public Selectors.TableSelectionPredicateBuilder includeDatabases(String databaseNames)
Specify the names of the databases that should be included. This method will override previously included andexcluded
databases.- 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
public Selectors.TableSelectionPredicateBuilder excludeDatabases(String databaseNames)
Specify the names of the databases that should be excluded. This method will override previouslyexcluded
databases, althoughincluding databases
overrides 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
public Selectors.TableSelectionPredicateBuilder includeSchemas(String schemaNames)
Specify the names of the schemas that should be included. This method will override previously included andexcluded
schemas.- 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
public Selectors.TableSelectionPredicateBuilder excludeSchemas(String schemaNames)
Specify the names of the schemas that should be excluded. This method will override previouslyexcluded
schemas, 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 andexcluded
table names.Note that any specified tables that are in an
excluded database
will 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
public Selectors.TableSelectionPredicateBuilder includeTables(String fullyQualifiedTableNames)
Specify the names of the tables that should be included. This method will override previously included andexcluded
table names.Note that any specified tables that are in an
excluded database
will 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 previouslyexcluded
tables, althoughincluding tables
overrides exclusions.Note that any specified tables that are in an
excluded database
will 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
public Selectors.TableSelectionPredicateBuilder excludeTables(String fullyQualifiedTableNames)
Specify the names of the tables that should be excluded. This method will override previouslyexcluded
tables, althoughincluding tables
overrides exclusions.Note that any specified tables that are in an
excluded database
will 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
public Predicate<TableId> build()
Build thePredicate
that determines whether a table identified by a givenTableId
is to be included.- Returns:
- the table selection predicate; never null
- See Also:
includeDatabases(String)
,excludeDatabases(String)
,includeTables(String)
,excludeTables(String)
,includeSchemas(String)
,excludeSchemas(String)
-
buildStartingFromSchemaFilter
private Predicate<TableId> buildStartingFromSchemaFilter(Predicate<String> schemaFilter, Predicate<TableId> tableFilter)
-
-