Class BinlogFieldReader
java.lang.Object
io.debezium.connector.binlog.jdbc.BinlogFieldReader
Decodes a binlog connector's JDBC result set return value based on configured protocols.
- Author:
- yangjie, Chris Cranford
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BinlogConnectorConfigprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringgetCharacterSet(Column column) Read the column's character set.protected BinlogCharsetRegistryprotected booleanhasValueConverter(Column column, TableId tableId) protected voidlogInvalidValue(ResultSet rs, int columnIndex, Object value) Common handler for logging invalid values.protected abstract ObjectreadDateField(ResultSet rs, int columnIndex, Column column, Table table) Reads the date field based on the requirements of the concrete field reader.*Read the field from the provided JDBCResultSet.protected abstract ObjectreadTimeField(ResultSet rs, int columnIndex, Column column, Table table) Reads the time field based on the requirements of the concrete field reader.*protected abstract ObjectreadTimestampField(ResultSet rs, int columnIndex, Column column, Table table) Reads the timestamp field based on the requirements of the concrete field reader.*
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TEXT_DATA_TYPES
-
connectorConfig
-
-
Constructor Details
-
BinlogFieldReader
-
-
Method Details
-
readField
public Object readField(ResultSet rs, int columnIndex, Column column, Table table) throws SQLException Read the field from the provided JDBCResultSet.- Parameters:
rs- the result set to be read, should not be nullcolumnIndex- the column index or position to readcolumn- the relational model column being read, never nulltable- the relational table being read, never null- Returns:
- the field's value
- Throws:
SQLException- if there is a database exception or failure reading the column's value
-
readTimeField
protected abstract Object readTimeField(ResultSet rs, int columnIndex, Column column, Table table) throws SQLException Reads the time field based on the requirements of the concrete field reader.*- Throws:
SQLException
-
readDateField
protected abstract Object readDateField(ResultSet rs, int columnIndex, Column column, Table table) throws SQLException Reads the date field based on the requirements of the concrete field reader.*- Throws:
SQLException
-
readTimestampField
protected abstract Object readTimestampField(ResultSet rs, int columnIndex, Column column, Table table) throws SQLException Reads the timestamp field based on the requirements of the concrete field reader.*- Throws:
SQLException
-
getCharacterSet
Read the column's character set. -
logInvalidValue
Common handler for logging invalid values.- Parameters:
rs- the result set, should not be nullcolumnIndex- the column index or position readvalue- the value that was read- Throws:
SQLException- if there is a database exception trying to get column metadata information
-
hasValueConverter
-
getCharsetRegistry
-