pgtypes

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeLogicalDecodingMessage pglogrepl.MessageType = 'M'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeginMessage

type BeginMessage pglogrepl.BeginMessage

type CommitMessage

type CommitMessage pglogrepl.CommitMessage

type DeleteMessage

type DeleteMessage struct {
	*pglogrepl.DeleteMessage
	OldValues map[string]any
}

type InsertMessage

type InsertMessage struct {
	*pglogrepl.InsertMessage
	NewValues map[string]any
}

type LSN

type LSN pglogrepl.LSN

func (LSN) String

func (lsn LSN) String() string

type LogicalReplicationMessage

type LogicalReplicationMessage struct {

	// Flags is either 0 (non-transactional) or 1 (transactional)
	Flags uint8
	// Xid is the transaction id (if transactional logical replication message)
	Xid *uint32
	// LSN is the LSN of the logical replication message
	LSN pglogrepl.LSN
	// Prefix is the prefix of the logical replication message
	Prefix string
	// Content is the content of the logical replication message
	Content []byte
	// contains filtered or unexported fields
}

LogicalReplicationMessage is a logical replication message.

func (*LogicalReplicationMessage) Decode

func (m *LogicalReplicationMessage) Decode(src []byte) (err error)

func (*LogicalReplicationMessage) IsTransactional

func (m *LogicalReplicationMessage) IsTransactional() bool

func (*LogicalReplicationMessage) SetType

func (m *LogicalReplicationMessage) SetType(t pglogrepl.MessageType)

func (*LogicalReplicationMessage) Type

func (m *LogicalReplicationMessage) Type() pglogrepl.MessageType

Type returns message type.

type OriginMessage

type OriginMessage pglogrepl.OriginMessage

type RelationMessage

type RelationMessage pglogrepl.RelationMessage

type ReplicaIdentity

type ReplicaIdentity string
const (
	NOTHING ReplicaIdentity = "n"
	FULL    ReplicaIdentity = "f"
	DEFAULT ReplicaIdentity = "d"
	INDEX   ReplicaIdentity = "i"
	UNKNOWN ReplicaIdentity = ""
)

func AsReplicaIdentity

func AsReplicaIdentity(val string) ReplicaIdentity

func (ReplicaIdentity) Description

func (ri ReplicaIdentity) Description() string

Description returns a description of this REPLICA IDENTITY Values are in sync with debezium project: https://github.com/debezium/debezium/blob/main/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java

func (*ReplicaIdentity) Scan

func (ri *ReplicaIdentity) Scan(src interface{}) error

type TruncateMessage

type TruncateMessage pglogrepl.TruncateMessage

type TypeMessage

type TypeMessage pglogrepl.TypeMessage

type UpdateMessage

type UpdateMessage struct {
	*pglogrepl.UpdateMessage
	OldValues map[string]any
	NewValues map[string]any
}

type XLogData

type XLogData struct {
	pglogrepl.XLogData

	LastBegin  LSN
	LastCommit LSN
	Xid        uint32
}

Jump to

Keyboard shortcuts

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