Package io.debezium.connector.sqlserver
Class SqlServerValueConverters
java.lang.Object
io.debezium.jdbc.JdbcValueConverters
io.debezium.connector.sqlserver.SqlServerValueConverters
- All Implemented Interfaces:
ValueConverterProvider
Conversion of SQL Server specific datatypes.
- Author:
- Jiri Pechanec
-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.jdbc.JdbcValueConverters
JdbcValueConverters.BigIntUnsignedMode, JdbcValueConverters.DecimalMode
-
Field Summary
Fields inherited from class io.debezium.jdbc.JdbcValueConverters
adaptiveTimeMicrosecondsPrecisionMode, adaptiveTimePrecisionMode, adjuster, bigIntUnsignedMode, binaryMode, decimalMode, defaultOffset, fallbackTimestampWithTimeZone, logger
-
Constructor Summary
ConstructorsConstructorDescriptionSqlServerValueConverters
(JdbcValueConverters.DecimalMode decimalMode, TemporalPrecisionMode temporalPrecisionMode, CommonConnectorConfig.BinaryHandlingMode binaryMode) Create a new instance that always uses UTC for the default time zone when converting values without timezone information to values that require timezones. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
convertTimestampWithZone
(Column column, org.apache.kafka.connect.data.Field fieldDefn, Object data) protected int
getTimePrecision
(Column column) Time precision in SQL Server is defined in scale, the default one is 7org.apache.kafka.connect.data.SchemaBuilder
schemaBuilder
(Column column) Methods inherited from class io.debezium.jdbc.JdbcValueConverters
byteOrderOfBitType, convertBigInt, convertBinary, convertBinaryToBase64, convertBinaryToBase64UrlSafe, convertBinaryToBytes, convertBinaryToHex, convertBit, convertBits, convertBits, convertBoolean, convertDateToEpochDays, convertDateToEpochDaysAsDate, convertDecimal, convertDouble, convertFloat, convertInteger, convertNumeric, convertReal, convertRowId, convertSmallInt, convertString, convertTime, convertTimestampToEpochMicros, convertTimestampToEpochMillis, convertTimestampToEpochMillisAsDate, convertTimestampToEpochNanos, convertTimeToMicrosPastMidnight, convertTimeToMillisPastMidnight, convertTimeToMillisPastMidnightAsDate, convertTimeToNanosPastMidnight, convertTimeWithZone, convertTinyInt, convertValue, handleUnknownData, normalizeBinaryData, padLittleEndian, toBigDecimal, toByteBuffer, unexpectedBinary, withScaleAdjustedIfNeeded
-
Constructor Details
-
SqlServerValueConverters
public SqlServerValueConverters() -
SqlServerValueConverters
public SqlServerValueConverters(JdbcValueConverters.DecimalMode decimalMode, TemporalPrecisionMode temporalPrecisionMode, CommonConnectorConfig.BinaryHandlingMode binaryMode) Create a new instance that always uses UTC for the default time zone when converting values without timezone information to values that require timezones.- Parameters:
decimalMode
- howDECIMAL
andNUMERIC
values should be treated; may be null ifJdbcValueConverters.DecimalMode.PRECISE
is to be usedtemporalPrecisionMode
- date/time value will be represented either as Connect datatypes or Debezium specific datatypes
-
-
Method Details
-
schemaBuilder
- Specified by:
schemaBuilder
in interfaceValueConverterProvider
- Overrides:
schemaBuilder
in classJdbcValueConverters
-
converter
- Specified by:
converter
in interfaceValueConverterProvider
- Overrides:
converter
in classJdbcValueConverters
-
getTimePrecision
Time precision in SQL Server is defined in scale, the default one is 7- Overrides:
getTimePrecision
in classJdbcValueConverters
-
convertTimestampWithZone
protected Object convertTimestampWithZone(Column column, org.apache.kafka.connect.data.Field fieldDefn, Object data) - Overrides:
convertTimestampWithZone
in classJdbcValueConverters
-