Documentation ¶
Index ¶
- Variables
- func AddMysql(v *debeziumcommon.Values, colName string, colVal interface{}, colType string, ...) error
- func GetKafkaTypeDescrByMysqlType(typeName string) (*debeziumcommon.KafkaTypeDescr, error)
- type Bit1
- type Date
- type Datetime
- type DebeziumBuf
- type Decimal
- type Int64Unsigned
- type IntSigned
- type IntUnsigned
- type JSON
- type SmallIntSigned
- type SmallIntUnsigned
- type Time
- type Timestamp
- type TinyInt1
- type TinyIntSigned
- type TinyIntUnsigned
Constants ¶
This section is empty.
Variables ¶
View Source
var KafkaTypeToOriginalTypeToFieldReceiverFunc = map[debeziumcommon.KafkaType]map[string]debeziumcommon.FieldReceiver{ debeziumcommon.KafkaTypeBoolean: { "mysql:tinyint(1)": new(TinyInt1), "mysql:bit(1)": new(Bit1), }, debeziumcommon.KafkaTypeInt16: { "mysql:smallint": new(debeziumcommon.Int16ToInt16Default), debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{ Matchers: []debeziumcommon.FieldReceiverMatcher{new(TinyIntSigned), new(TinyIntUnsigned)}, }, }, debeziumcommon.KafkaTypeInt32: { "mysql:date": new(Date), "mysql:year": new(debeziumcommon.IntToStringDefault), debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{ Matchers: []debeziumcommon.FieldReceiverMatcher{new(SmallIntSigned), new(SmallIntUnsigned)}, }, }, debeziumcommon.KafkaTypeInt64: { "mysql:time": new(Time), "mysql:datetime": new(Datetime), debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{ Matchers: []debeziumcommon.FieldReceiverMatcher{new(IntSigned), new(IntUnsigned), new(Int64Unsigned)}, }, }, debeziumcommon.KafkaTypeString: { "mysql:timestamp": new(Timestamp), "mysql:json": new(JSON), }, debeziumcommon.KafkaTypeBytes: { "mysql:decimal": new(Decimal), debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{ Matchers: []debeziumcommon.FieldReceiverMatcher{new(DebeziumBuf)}, }, }, }
Functions ¶
func GetKafkaTypeDescrByMysqlType ¶
func GetKafkaTypeDescrByMysqlType(typeName string) (*debeziumcommon.KafkaTypeDescr, error)
Types ¶
type Bit1 ¶
type Bit1 struct { debeziumcommon.BooleanToBytes debeziumcommon.YTTypeBytes debeziumcommon.FieldReceiverMarker }
func (*Bit1) Do ¶
func (d *Bit1) Do(in bool, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) ([]byte, error)
type Date ¶
type Date struct { debeziumcommon.Int64ToTime debeziumcommon.YTTypeString debeziumcommon.FieldReceiverMarker }
func (*Date) Do ¶
func (d *Date) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (time.Time, error)
type Datetime ¶
type Datetime struct { debeziumcommon.Int64ToTime debeziumcommon.YTTypeString debeziumcommon.FieldReceiverMarker }
func (*Datetime) Do ¶
func (d *Datetime) Do(in int64, originalType *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (time.Time, error)
type DebeziumBuf ¶
type DebeziumBuf struct { debeziumcommon.StringToBytes debeziumcommon.YTTypeBytes debeziumcommon.FieldReceiverMarker }
func (*DebeziumBuf) Do ¶
func (b *DebeziumBuf) Do(in string, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) ([]byte, error)
func (*DebeziumBuf) IsMatched ¶
func (b *DebeziumBuf) IsMatched(_ *debeziumcommon.OriginalTypeInfo, schema *debeziumcommon.Schema) bool
type Decimal ¶
type Decimal struct { debeziumcommon.AnyToDouble debeziumcommon.YTTypeFloat64 debeziumcommon.FieldReceiverMarker }
func (*Decimal) Do ¶
func (b *Decimal) Do(in interface{}, originalTypeInfo *debeziumcommon.OriginalTypeInfo, schema *debeziumcommon.Schema, _ bool) (json.Number, error)
type Int64Unsigned ¶
type Int64Unsigned struct { debeziumcommon.Int64ToUint64 debeziumcommon.YTTypeUint64 debeziumcommon.FieldReceiverMarker }
func (*Int64Unsigned) Do ¶
func (d *Int64Unsigned) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (uint64, error)
func (*Int64Unsigned) IsMatched ¶
func (d *Int64Unsigned) IsMatched(originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema) bool
type IntSigned ¶
type IntSigned struct { debeziumcommon.Int64ToInt32 debeziumcommon.YTTypeInt32 debeziumcommon.FieldReceiverMarker }
func (*IntSigned) Do ¶
func (d *IntSigned) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (int32, error)
func (*IntSigned) IsMatched ¶
func (d *IntSigned) IsMatched(originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema) bool
type IntUnsigned ¶
type IntUnsigned struct { debeziumcommon.Int64ToUint32 debeziumcommon.YTTypeUint32 debeziumcommon.FieldReceiverMarker }
func (*IntUnsigned) Do ¶
func (d *IntUnsigned) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (uint32, error)
func (*IntUnsigned) IsMatched ¶
func (d *IntUnsigned) IsMatched(originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema) bool
type JSON ¶
type JSON struct { debeziumcommon.StringToAny debeziumcommon.YTTypeAny debeziumcommon.FieldReceiverMarker }
func (*JSON) Do ¶
func (j *JSON) Do(in string, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (interface{}, error)
type SmallIntSigned ¶
type SmallIntSigned struct { debeziumcommon.Int16ToInt16 debeziumcommon.YTTypeInt16 debeziumcommon.FieldReceiverMarker }
func (*SmallIntSigned) Do ¶
func (d *SmallIntSigned) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (int16, error)
func (*SmallIntSigned) IsMatched ¶
func (d *SmallIntSigned) IsMatched(originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema) bool
type SmallIntUnsigned ¶
type SmallIntUnsigned struct { debeziumcommon.Int16ToUint16 debeziumcommon.YTTypeUint16 debeziumcommon.FieldReceiverMarker }
func (*SmallIntUnsigned) Do ¶
func (d *SmallIntUnsigned) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (uint16, error)
func (*SmallIntUnsigned) IsMatched ¶
func (d *SmallIntUnsigned) IsMatched(originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema) bool
type Time ¶
type Time struct { debeziumcommon.IntToString debeziumcommon.YTTypeString debeziumcommon.FieldReceiverMarker }
func (*Time) Do ¶
func (d *Time) Do(in int64, originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (string, error)
type Timestamp ¶
type Timestamp struct { debeziumcommon.StringToTime debeziumcommon.YTTypeTimestamp debeziumcommon.FieldReceiverMarker }
func (*Timestamp) Do ¶
func (d *Timestamp) Do(in string, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (time.Time, error)
type TinyInt1 ¶
type TinyInt1 struct { debeziumcommon.BooleanToInt8 debeziumcommon.YTTypeBoolean debeziumcommon.FieldReceiverMarker }
func (*TinyInt1) Do ¶
func (d *TinyInt1) Do(in bool, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (int8, error)
type TinyIntSigned ¶
type TinyIntSigned struct { debeziumcommon.Int16ToInt8 debeziumcommon.YTTypeInt8 debeziumcommon.FieldReceiverMarker }
func (*TinyIntSigned) Do ¶
func (d *TinyIntSigned) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (int8, error)
func (*TinyIntSigned) IsMatched ¶
func (d *TinyIntSigned) IsMatched(originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema) bool
type TinyIntUnsigned ¶
type TinyIntUnsigned struct { debeziumcommon.Int16ToUint8 debeziumcommon.YTTypeUint8 debeziumcommon.FieldReceiverMarker }
func (*TinyIntUnsigned) Do ¶
func (d *TinyIntUnsigned) Do(in int64, _ *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema, _ bool) (uint8, error)
func (*TinyIntUnsigned) IsMatched ¶
func (d *TinyIntUnsigned) IsMatched(originalTypeInfo *debeziumcommon.OriginalTypeInfo, _ *debeziumcommon.Schema) bool
Click to show internal directories.
Click to hide internal directories.