Class NanoTimeType
java.lang.Object
io.debezium.connector.jdbc.type.AbstractType
io.debezium.connector.jdbc.type.AbstractTimeType
io.debezium.connector.jdbc.type.debezium.NanoTimeType
- All Implemented Interfaces:
Type
An implementation of
Type for NanoTime values.- Author:
- Chris Cranford
-
Field Summary
Fields -
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.getDefaultValueBinding(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, Object value) Resolve the default value clause value.String[]Returns the names that this type will be mapped as.getTypeName(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, boolean key) Return the SQL type name for this type.private ZonedDateTimetoZonedDateTime(long value) Methods inherited from class io.debezium.connector.jdbc.type.AbstractTimeType
getTimePrecisionMethods inherited from class io.debezium.connector.jdbc.type.AbstractType
getQueryBinding, getSchemaParameter, getSourceColumnPrecision, getSourceColumnSize, getSourceColumnType, throwUnexpectedValue, toString
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NanoTimeType
public NanoTimeType()
-
-
Method Details
-
getRegistrationKeys
Description copied from interface:TypeReturns the names that this type will be mapped as.For example, when creating a custom mapping for
io.debezium.data.Bits, a type could be registered using theLOGICAL_NAMEof the schema if the type is to be used when a schema name is identified; otherwise it could be registered as the raw column type when column type propagation is enabled. -
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.- Specified by:
getTypeNamein interfaceType- Overrides:
getTypeNamein classAbstractTimeType- 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 classAbstractType- 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.- Specified by:
bindin interfaceType- Overrides:
bindin classAbstractType- Parameters:
query- hibernate query, is nevernullindex- parameter index to bindschema- field schema, nevernullvalue- value to be bound, may benull
-
toZonedDateTime
-