Package io.debezium.connector.jdbc.type
Class AbstractType
java.lang.Object
io.debezium.connector.jdbc.type.AbstractType
- All Implemented Interfaces:
Type
- Direct Known Subclasses:
AbstractConnectSchemaType,AbstractTemporalType,BitType,BitType,BitType,BooleanType,BytesType,BytesType,BytesType,CaseInsensitiveTextType,CidrType,ConnectDecimalType,EnumType,EnumType,InetType,IntegerType,IntervalType,JsonType,JsonType,LtreeType,MacAddressType,MediumIntType,MoneyType,NumberType,OidType,PointType,RangeType,SerialType,SetType,TinyIntType,UuidType,VariableScaleDecimalType,XmlType,XmlType,YearType
An abstract implementation of
Type, which all types should extend.- Author:
- Chris Cranford
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DatabaseDialectprivate static final Stringprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(org.hibernate.query.Query<?> query, int index, org.apache.kafka.connect.data.Schema schema, Object value) Binds the value to the query.voidconfigure(JdbcSinkConnectorConfig config, DatabaseDialect dialect) Allows a type to perform initialization/configuration tasks based on user configs.getDefaultValueBinding(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, Object value) Resolve the default value clause value.protected DatabaseDialectgetQueryBinding(ColumnDescriptor column, org.apache.kafka.connect.data.Schema schema) Return the SQL string to be used in DML statements for binding this type to SQL.getSchemaParameter(org.apache.kafka.connect.data.Schema schema, String parameterName) getSourceColumnPrecision(org.apache.kafka.connect.data.Schema schema) getSourceColumnSize(org.apache.kafka.connect.data.Schema schema) getSourceColumnType(org.apache.kafka.connect.data.Schema schema) protected voidthrowUnexpectedValue(Object value) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.debezium.connector.jdbc.type.Type
getRegistrationKeys, getTypeName
-
Field Details
-
SCHEMA_PARAMETER_COLUMN_TYPE
- See Also:
-
SCHEMA_PARAMETER_COLUMN_SIZE
- See Also:
-
SCHEMA_PARAMETER_COLUMN_PRECISION
- See Also:
-
dialect
-
-
Constructor Details
-
AbstractType
public AbstractType()
-
-
Method Details
-
configure
Description copied from interface:TypeAllows a type to perform initialization/configuration tasks based on user configs. -
getQueryBinding
Description copied from interface:TypeReturn the SQL string to be used in DML statements for binding this type to SQL.- Specified by:
getQueryBindingin interfaceType- Parameters:
column- column descriptor in the table relational model, nevernullschema- field schema, nevernull- Returns:
- query parameter argument binding SQL fragment
-
getDefaultValueBinding
public String getDefaultValueBinding(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, Object value) Description copied from interface:TypeResolve the default value clause value.- Specified by:
getDefaultValueBindingin interfaceType- Parameters:
dialect- dialect instance, nevernullschema- field schema, nevernullvalue- the default value, should not benull- Returns:
- the formatted default value for the SQL statement as a string
-
bind
public void bind(org.hibernate.query.Query<?> query, int index, org.apache.kafka.connect.data.Schema schema, Object value) Description copied from interface:TypeBinds the value to the query. -
getDialect
-
getSourceColumnType
-
getSourceColumnSize
-
getSourceColumnPrecision
-
getSchemaParameter
-
throwUnexpectedValue
-
toString
-