pg

package
v0.0.0-rc9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KafkaTypeToOriginalTypeToFieldReceiverFunc = map[debeziumcommon.KafkaType]map[string]debeziumcommon.FieldReceiver{
	debeziumcommon.KafkaTypeInt32: {
		"pg:date": new(Date),
		debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{
			Matchers: []debeziumcommon.FieldReceiverMatcher{new(TimeWithoutTimeZone)},
		},
	},
	debeziumcommon.KafkaTypeInt64: {
		"pg:interval": new(Interval),
		"pg:oid":      new(Oid),
		debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{
			Matchers: []debeziumcommon.FieldReceiverMatcher{new(TimestampWithoutTimeZone), new(TimeWithoutTimeZone2)},
		},
	},
	debeziumcommon.KafkaTypeBoolean: {
		"pg:bit(1)": new(Bit1),
	},
	debeziumcommon.KafkaTypeBytes: {
		"pg:bit":         new(BitN),
		"pg:bit varying": new(BitVarying),
		"pg:money":       new(debeziumcommon.Decimal),
		debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{
			Matchers: []debeziumcommon.FieldReceiverMatcher{new(Decimal), new(DebeziumBuf)},
		},
	},
	debeziumcommon.KafkaTypeFloat64: {
		"pg:double precision": new(DoublePrecision),
	},
	debeziumcommon.KafkaTypeString: {
		"pg:inet":      new(Inet),
		"pg:int4range": new(debeziumcommon.StringToAnyDefault),
		"pg:int8range": new(debeziumcommon.StringToAnyDefault),
		"pg:json":      new(JSON),
		"pg:jsonb":     new(JSON),
		"pg:numrange":  new(NumRange),
		"pg:tsrange":   new(TSRange),
		"pg:tstzrange": new(TSTZRange),
		"pg:xml":       new(debeziumcommon.StringToAnyDefault),
		"pg:citext":    new(CIText),
		"pg:hstore":    new(HStore),
		"pg:macaddr":   new(StringButYTAny),
		"pg:cidr":      new(StringButYTAny),
		"pg:character": new(StringButYTAny),
		"pg:daterange": new(StringButYTAny),
		debeziumcommon.DTMatchByFunc: &debeziumcommon.FieldReceiverMatchers{
			Matchers: []debeziumcommon.FieldReceiverMatcher{new(TimestampWithTimeZone), new(Enum)},
		},
	},
	debeziumcommon.KafkaTypeStruct: {
		"pg:point": new(Point),
	},
}
View Source
var OriginalTypePropertyTimeZone = "timezone"

Functions

func AddPg

func AddPg(v *debeziumcommon.Values, colSchema *abstract.ColSchema, colName string, colVal interface{}, originalType string, intoArr bool, connectorParameters map[string]string) error

func GetKafkaTypeDescrByPgType

func GetKafkaTypeDescrByPgType(colSchema *abstract.ColSchema) (*debeziumcommon.KafkaTypeDescr, error)

func GetOriginalTypeProperties

func GetOriginalTypeProperties(in *abstract.ColSchema) map[string]string

Types

type Decimal

type Decimal struct {
	debeziumcommon.StringToAny
	debeziumcommon.YTTypeFloat64
	debeziumcommon.FieldReceiverMarker
	// contains filtered or unexported fields
}

func (*Decimal) Do

func (d *Decimal) Do(in string, originalType *debeziumcommon.OriginalTypeInfo, schema *debeziumcommon.Schema, intoArr bool) (interface{}, error)

func (*Decimal) IsMatched

type Enum

func (*Enum) AddInfo

func (t *Enum) AddInfo(schema *debeziumcommon.Schema, outColSchema *abstract.ColSchema)

func (*Enum) Do

func (*Enum) IsMatched

func (t *Enum) IsMatched(_ *debeziumcommon.OriginalTypeInfo, debeziumSchema *debeziumcommon.Schema) bool

type Point

type Point struct {
	debeziumcommon.AnyToAny
	debeziumcommon.YTTypeAny
	debeziumcommon.FieldReceiverMarker
	// contains filtered or unexported fields
}

func (*Point) AddInfo

func (d *Point) AddInfo(_ *debeziumcommon.Schema, colSchema *abstract.ColSchema)

func (*Point) Do

func (d *Point) Do(in interface{}, originalTypeInfo *debeziumcommon.OriginalTypeInfo, schema *debeziumcommon.Schema, intoArr bool) (interface{}, error)

type TimeWithoutTimeZone

func (*TimeWithoutTimeZone) Do

func (*TimeWithoutTimeZone) IsMatched

type TimeWithoutTimeZone2

func (*TimeWithoutTimeZone2) Do

func (*TimeWithoutTimeZone2) IsMatched

type TimestampWithTimeZone

func (*TimestampWithTimeZone) Do

func (*TimestampWithTimeZone) IsMatched

type TimestampWithoutTimeZone

func (*TimestampWithoutTimeZone) Do

func (*TimestampWithoutTimeZone) IsMatched

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL