Package io.debezium.relational
Class ColumnId
java.lang.Object
io.debezium.relational.ColumnId
- All Implemented Interfaces:
Comparable<ColumnId>
Unique identifier for a column in a database table.
- Author:
- Randall Hauch
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncatalog()
Get the name of the JDBC catalog.private static String
Get the name of the table.int
int
compareToIgnoreCase
(ColumnId that) boolean
Create the map of predicate functions that specify which columns are to be included.int
hashCode()
static ColumnId
Parse the supplied string delimited with a period (.
) character, extracting the last segment into a column name and the prior segments into the TableID.private static ColumnId
Parse the supplied string delimited with the specified delimiter character, extracting the last segment into a column name and the prior segments into the TableID.schema()
Get the name of the JDBC schema.table()
Get the name of the table.tableId()
Get the identifier for the table that owns this column.toString()
-
Field Details
-
IDENTIFIER_SEPARATOR_PATTERN
-
tableId
-
columnName
-
id
-
-
Constructor Details
-
ColumnId
Create a new column identifier.- Parameters:
tableId
- the identifier of the table; may not be nullcolumnName
- the name of the column; may not be null
-
ColumnId
Create a new column identifier.- Parameters:
catalogName
- the name of the database catalog that contains the table; may be null if the JDBC driver does not show a schema for this tableschemaName
- the name of the database schema that contains the table; may be null if the JDBC driver does not show a schema for this tabletableName
- the name of the table; may not be nullcolumnName
- the name of the column; may not be null
-
-
Method Details
-
filter
Create the map of predicate functions that specify which columns are to be included.Qualified column names are comma-separated strings that are each
parsed
intoColumnId
objects.- Parameters:
columnExcludeList
- the comma-separated string listing the qualified names of the columns to be explicitly disallowed; may be null- Returns:
- the predicate function; never null
-
parse
Parse the supplied string delimited with a period (.
) character, extracting the last segment into a column name and the prior segments into the TableID.- Parameters:
str
- the input string- Returns:
- the column ID, or null if it could not be parsed
-
parse
Parse the supplied string delimited with the specified delimiter character, extracting the last segment into a column name and the prior segments into the TableID.- Parameters:
str
- the input stringuseCatalogBeforeSchema
-true
if the parsed string contains only 2 items and the first should be used as the catalog and the second as the table name, orfalse
if the first should be used as the schema and the second as the table name- Returns:
- the column ID, or null if it could not be parsed
-
tableId
Get the identifier for the table that owns this column.- Returns:
- the table identifier; never null
-
catalog
Get the name of the JDBC catalog.- Returns:
- the catalog name, or null if the table does not belong to a catalog
-
schema
Get the name of the JDBC schema.- Returns:
- the JDBC schema name, or null if the table does not belong to a JDBC schema
-
table
Get the name of the table.- Returns:
- the table name; never null
-
columnName
Get the name of the table.- Returns:
- the table name; never null
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ColumnId>
-
compareToIgnoreCase
-
hashCode
public int hashCode() -
equals
-
toString
-
columnId
-