Package io.debezium.connector.sqlserver
Class SqlServerValueConverters
- java.lang.Object
-
- io.debezium.jdbc.JdbcValueConverters
-
- io.debezium.connector.sqlserver.SqlServerValueConverters
-
- All Implemented Interfaces:
ValueConverterProvider
public class SqlServerValueConverters extends JdbcValueConverters
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, bigIntUnsignedMode, binaryMode, decimalMode, logger
-
-
Constructor Summary
Constructors Constructor Description SqlServerValueConverters()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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueConverterconverter(Column column, org.apache.kafka.connect.data.Field fieldDefn)protected ObjectconvertTimestampWithZone(Column column, org.apache.kafka.connect.data.Field fieldDefn, Object data)protected intgetTimePrecision(Column column)Time precision in SQL Server is defined in scale, the default one is 7org.apache.kafka.connect.data.SchemaBuilderschemaBuilder(Column column)-
Methods inherited from class io.debezium.jdbc.JdbcValueConverters
byteOrderOfBitType, convertBigInt, convertBinary, convertBinaryToBase64, 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 Detail
-
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- howDECIMALandNUMERICvalues should be treated; may be null ifJdbcValueConverters.DecimalMode.PRECISEis to be usedtemporalPrecisionMode- date/time value will be represented either as Connect datatypes or Debezium specific datatypes
-
-
Method Detail
-
schemaBuilder
public org.apache.kafka.connect.data.SchemaBuilder schemaBuilder(Column column)
- Specified by:
schemaBuilderin interfaceValueConverterProvider- Overrides:
schemaBuilderin classJdbcValueConverters
-
converter
public ValueConverter converter(Column column, org.apache.kafka.connect.data.Field fieldDefn)
- Specified by:
converterin interfaceValueConverterProvider- Overrides:
converterin classJdbcValueConverters
-
getTimePrecision
protected int getTimePrecision(Column column)
Time precision in SQL Server is defined in scale, the default one is 7- Overrides:
getTimePrecisionin classJdbcValueConverters
-
convertTimestampWithZone
protected Object convertTimestampWithZone(Column column, org.apache.kafka.connect.data.Field fieldDefn, Object data)
- Overrides:
convertTimestampWithZonein classJdbcValueConverters
-
-