schema

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MessageBlockSchemaName = "io.debezium.connector.postgresql.Message"
View Source
const MessageKeySchemaName = "io.debezium.connector.postgresql.MessageKey"
View Source
const MessageValueSchemaName = "io.debezium.connector.postgresql.MessageValue"
View Source
const SourceSchemaName = "io.debezium.connector.postgresql.Source"
View Source
const TimescaleEventSchemaName = "com.timescale.Event"

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation string
const (
	OP_READ      Operation = "r"
	OP_CREATE    Operation = "c"
	OP_UPDATE    Operation = "u"
	OP_DELETE    Operation = "d"
	OP_TRUNCATE  Operation = "t"
	OP_MESSAGE   Operation = "m"
	OP_TIMESCALE Operation = "$"
)

type Registry

type Registry interface {
	RegisterSchema(schemaName string, schema Struct)
	GetSchema(schemaName string) Struct
	GetSchemaOrCreate(schemaName string, creator func() Struct) Struct
	HypertableEnvelopeSchemaName(hypertable *systemcatalog.Hypertable) string
	HypertableKeySchemaName(hypertable *systemcatalog.Hypertable) string
	MessageEnvelopeSchemaName() string
}

type Struct

type Struct = map[schemaField]any

func CompressionEvent

func CompressionEvent(source Struct) Struct

func CreateEvent

func CreateEvent(record Struct, source Struct) Struct

func DecompressionEvent

func DecompressionEvent(source Struct) Struct

func DeleteEvent

func DeleteEvent(before, source Struct, tombstone bool) Struct

func Envelope

func Envelope(schema, payload Struct) Struct

func EnvelopeMessageSchema

func EnvelopeMessageSchema(schemaRegistry Registry, topicSchemaGenerator namegenerator.NameGenerator) Struct

func EnvelopeSchema

func EnvelopeSchema(schemaRegistry Registry, hypertable *systemcatalog.Hypertable,
	topicSchemaGenerator namegenerator.NameGenerator) Struct

func HypertableSchema

func HypertableSchema(hypertableSchemaName string, columns []systemcatalog.Column) Struct

func KeySchema

func KeySchema(hypertable *systemcatalog.Hypertable, topicSchemaGenerator namegenerator.NameGenerator) Struct

func MessageEvent

func MessageEvent(prefix, content string, source Struct) Struct

func MessageKey

func MessageKey(prefix string) Struct

func MessageKeySchema

func MessageKeySchema() Struct

func MessageValueSchema

func MessageValueSchema(schemaRegistry Registry) Struct

func ReadEvent

func ReadEvent(record Struct, source Struct) Struct

func Source

func Source(lsn pglogrepl.LSN, timestamp time.Time, snapshot bool,
	databaseName, schemaName, hypertableName string, transactionId *uint32) Struct

func SourceSchema

func SourceSchema() Struct

func TimescaleEventKeySchema

func TimescaleEventKeySchema() Struct

func TimescaleKey

func TimescaleKey(schemaName, tableName string) Struct

func TruncateEvent

func TruncateEvent(source Struct) Struct

func UpdateEvent

func UpdateEvent(before, after, source Struct) Struct

type TimescaleOperation

type TimescaleOperation string
const (
	OP_COMPRESSION   TimescaleOperation = "c"
	OP_DECOMPRESSION TimescaleOperation = "d"
)

Jump to

Keyboard shortcuts

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