Class ConnectMapToConnectStringType
java.lang.Object
io.debezium.connector.jdbc.type.AbstractType
io.debezium.connector.jdbc.type.connect.AbstractConnectSchemaType
io.debezium.connector.jdbc.type.connect.AbstractConnectMapType
io.debezium.connector.jdbc.type.connect.ConnectMapToConnectStringType
- All Implemented Interfaces:
Type
An implementation of
Type for MAP schema types that are mapped to the
dialect's connect string-based type.- Author:
- Chris Cranford
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBinds the value to the query.getDefaultValueBinding(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, Object value) Resolve the default value clause value.getQueryBinding(ColumnDescriptor column, org.apache.kafka.connect.data.Schema schema, Object value) Return the SQL string to be used in DML statements for binding this type to SQL.getTypeName(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, boolean key) Return the SQL type name for this type.Methods inherited from class io.debezium.connector.jdbc.type.connect.AbstractConnectMapType
getRegistrationKeys, mapToJsonStringMethods inherited from class io.debezium.connector.jdbc.type.AbstractType
configure, getDialect, getSchemaParameter, getSourceColumnPrecision, getSourceColumnSize, getSourceColumnType, throwUnexpectedValue, toString
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ConnectMapToConnectStringType
public ConnectMapToConnectStringType()
-
-
Method Details
-
getQueryBinding
public String getQueryBinding(ColumnDescriptor column, org.apache.kafka.connect.data.Schema schema, Object value) Description copied from interface:TypeReturn the SQL string to be used in DML statements for binding this type to SQL.- Specified by:
getQueryBindingin interfaceType- Overrides:
getQueryBindingin classAbstractType- Parameters:
column- column descriptor in the table relational model, nevernullschema- field schema, nevernullvalue- value to be bound, may benull- Returns:
- query parameter argument binding SQL fragment
-
getTypeName
public String getTypeName(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, boolean key) Description copied from interface:TypeReturn the SQL type name for this type.- Parameters:
dialect- dialect instance, nevernullschema- field schema, nevernullkey- whether the type resolution is for a key field- Returns:
- the resolved type to be used in DDL statements
-
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- Overrides:
getDefaultValueBindingin classAbstractConnectMapType- 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 List<ValueBindDescriptor> bind(int index, org.apache.kafka.connect.data.Schema schema, Object value) Description copied from interface:TypeBinds the value to the query.- Specified by:
bindin interfaceType- Overrides:
bindin classAbstractType- Parameters:
index- parameter index to bindschema- field schema, nevernullvalue- value to be bound, may benull- Returns:
- the list of
ValueBindDescriptor
-