Documentation ¶
Index ¶
- Constants
- func AsFieldLength(typ PgType, modifiers int) (int, bool)
- func ParseXlogData(data []byte, lastTransactionId *uint32) (pglogrepl.Message, error)
- type BeginMessage
- type BoxArrayCodec
- func (c *BoxArrayCodec) DecodeDatabaseSQLValue(m *pgtype.Map, oid uint32, format int16, src []byte) (driver.Value, error)
- func (c *BoxArrayCodec) DecodeValue(m *pgtype.Map, oid uint32, format int16, src []byte) (any, error)
- func (c *BoxArrayCodec) FormatSupported(format int16) bool
- func (c *BoxArrayCodec) PlanEncode(m *pgtype.Map, oid uint32, format int16, value any) pgtype.EncodePlan
- func (c *BoxArrayCodec) PlanScan(m *pgtype.Map, oid uint32, format int16, target any) pgtype.ScanPlan
- func (c *BoxArrayCodec) PreferredFormat() int16
- type CommitMessage
- type CompositeColumn
- type CompositeColumnFactory
- type DeleteMessage
- type InsertMessage
- type LSN
- type LogicalReplicationMessage
- func (m *LogicalReplicationMessage) Decode(src []byte) (err error)
- func (m *LogicalReplicationMessage) IsTransactional() bool
- func (m *LogicalReplicationMessage) SetType(t pglogrepl.MessageType)
- func (m *LogicalReplicationMessage) String() string
- func (m *LogicalReplicationMessage) Type() pglogrepl.MessageType
- type Ltree
- type LtreeCodec
- func (c LtreeCodec) DecodeDatabaseSQLValue(m *pgtype.Map, oid uint32, format int16, src []byte) (driver.Value, error)
- func (c LtreeCodec) DecodeValue(m *pgtype.Map, oid uint32, format int16, src []byte) (any, error)
- func (LtreeCodec) FormatSupported(format int16) bool
- func (LtreeCodec) PlanEncode(_ *pgtype.Map, _ uint32, format int16, value any) pgtype.EncodePlan
- func (LtreeCodec) PlanScan(_ *pgtype.Map, _ uint32, format int16, target any) pgtype.ScanPlan
- func (LtreeCodec) PreferredFormat() int16
- type LtreeScanner
- type LtreeValuer
- type OriginMessage
- type PgCategory
- type PgKind
- type PgType
- type RelationMessage
- type ReplicaIdentity
- type RowDecoder
- type RowDecoderFactory
- type Timetz
- type TimetzCodec
- func (c TimetzCodec) DecodeDatabaseSQLValue(m *pgtype.Map, oid uint32, format int16, src []byte) (driver.Value, error)
- func (c TimetzCodec) DecodeValue(m *pgtype.Map, oid uint32, format int16, src []byte) (any, error)
- func (TimetzCodec) FormatSupported(format int16) bool
- func (TimetzCodec) PlanEncode(_ *pgtype.Map, _ uint32, format int16, value any) pgtype.EncodePlan
- func (TimetzCodec) PlanScan(_ *pgtype.Map, _ uint32, format int16, target any) pgtype.ScanPlan
- func (TimetzCodec) PreferredFormat() int16
- type TimetzScanner
- type TimetzValuer
- type TruncateMessage
- type TupleDecoderPlan
- type TypeConverter
- type TypeFactory
- type TypeManager
- type TypeMessage
- type UpdateMessage
- type XLogData
- type Xml
- type XmlCodec
- func (c XmlCodec) DecodeDatabaseSQLValue(m *pgtype.Map, oid uint32, format int16, src []byte) (driver.Value, error)
- func (c XmlCodec) DecodeValue(m *pgtype.Map, oid uint32, format int16, src []byte) (any, error)
- func (XmlCodec) FormatSupported(format int16) bool
- func (XmlCodec) PlanEncode(_ *pgtype.Map, _ uint32, format int16, value any) pgtype.EncodePlan
- func (XmlCodec) PlanScan(_ *pgtype.Map, _ uint32, format int16, target any) pgtype.ScanPlan
- func (XmlCodec) PreferredFormat() int16
- type XmlScanner
- type XmlValuer
Constants ¶
const ( QCharArrayOID uint32 = 1002 MacAddr8OID uint32 = 774 MacAddrArray8OID uint32 = 775 TimeTZOID uint32 = 1266 TimeTZArrayOID uint32 = 1270 XmlOID uint32 = 142 XmlArrayOID uint32 = 143 )
const (
MessageTypeLogicalDecodingMessage pglogrepl.MessageType = 'M'
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BeginMessage ¶
type BeginMessage pglogrepl.BeginMessage
func (BeginMessage) String ¶ added in v0.0.12
func (m BeginMessage) String() string
type BoxArrayCodec ¶ added in v0.5.0
type BoxArrayCodec struct {
PgxArrayCodec *pgtype.ArrayCodec
}
BoxArrayCodec is a wrapper codec for box[] which isn't handled gracefully in the pgx base source code (at least in PG < 14 without binary wire protocol support) due to the way the text protocol sends back the value of a box item.
func (*BoxArrayCodec) DecodeDatabaseSQLValue ¶ added in v0.5.0
func (*BoxArrayCodec) DecodeValue ¶ added in v0.5.0
func (*BoxArrayCodec) FormatSupported ¶ added in v0.5.0
func (c *BoxArrayCodec) FormatSupported( format int16, ) bool
func (*BoxArrayCodec) PlanEncode ¶ added in v0.5.0
func (c *BoxArrayCodec) PlanEncode( m *pgtype.Map, oid uint32, format int16, value any, ) pgtype.EncodePlan
func (*BoxArrayCodec) PreferredFormat ¶ added in v0.5.0
func (c *BoxArrayCodec) PreferredFormat() int16
type CommitMessage ¶
type CommitMessage pglogrepl.CommitMessage
func (CommitMessage) String ¶ added in v0.0.12
func (m CommitMessage) String() string
type CompositeColumn ¶ added in v0.5.0
type CompositeColumnFactory ¶ added in v0.5.0
type DeleteMessage ¶
type DeleteMessage struct { *pglogrepl.DeleteMessage OldValues map[string]any }
func (DeleteMessage) String ¶ added in v0.0.12
func (m DeleteMessage) String() string
type InsertMessage ¶
type InsertMessage struct { *pglogrepl.InsertMessage NewValues map[string]any }
func (InsertMessage) String ¶ added in v0.0.12
func (m InsertMessage) 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) String ¶ added in v0.0.12
func (m *LogicalReplicationMessage) String() string
func (*LogicalReplicationMessage) Type ¶
func (m *LogicalReplicationMessage) Type() pglogrepl.MessageType
Type returns message type.
type Ltree ¶ added in v0.3.1
func (Ltree) LtreeValue ¶ added in v0.3.1
func (Ltree) MarshalJSON ¶ added in v0.3.1
func (*Ltree) UnmarshalJSON ¶ added in v0.3.1
type LtreeCodec ¶ added in v0.3.1
type LtreeCodec struct{}
func (LtreeCodec) DecodeDatabaseSQLValue ¶ added in v0.3.1
func (LtreeCodec) DecodeValue ¶ added in v0.3.1
func (LtreeCodec) FormatSupported ¶ added in v0.3.1
func (LtreeCodec) FormatSupported( format int16, ) bool
func (LtreeCodec) PlanEncode ¶ added in v0.3.1
func (LtreeCodec) PlanEncode( _ *pgtype.Map, _ uint32, format int16, value any, ) pgtype.EncodePlan
func (LtreeCodec) PreferredFormat ¶ added in v0.3.1
func (LtreeCodec) PreferredFormat() int16
type LtreeScanner ¶ added in v0.3.1
type LtreeValuer ¶ added in v0.3.1
type OriginMessage ¶
type OriginMessage pglogrepl.OriginMessage
func (OriginMessage) String ¶ added in v0.0.12
func (m OriginMessage) String() string
type PgCategory ¶ added in v0.3.1
type PgCategory string
const ( Array PgCategory = "A" Boolean PgCategory = "B" Composite PgCategory = "C" DateTime PgCategory = "D" Enum PgCategory = "E" Geometric PgCategory = "G" Network PgCategory = "I" Numeric PgCategory = "N" Pseudo PgCategory = "P" Range PgCategory = "R" String PgCategory = "S" Timespan PgCategory = "T" UserDefined PgCategory = "D" BitString PgCategory = "V" Unknown PgCategory = "X" InternalUse PgCategory = "Z" )
type PgType ¶ added in v0.3.1
type PgType interface { schema.Buildable Namespace() string Name() string Kind() PgKind Oid() uint32 Category() PgCategory IsArray() bool IsRecord() bool ArrayType() PgType ElementType() PgType BaseType() PgType OidArray() uint32 OidElement() uint32 OidBase() uint32 Modifiers() int EnumValues() []string Delimiter() string CompositeColumns() ([]CompositeColumn, error) SchemaType() schema.Type Format() string Equal( other PgType, ) bool }
type RelationMessage ¶
type RelationMessage pglogrepl.RelationMessage
func (RelationMessage) String ¶ added in v0.0.12
func (m RelationMessage) String() string
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: debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java
func (*ReplicaIdentity) Scan ¶
func (ri *ReplicaIdentity) Scan( src interface{}, ) error
type RowDecoder ¶ added in v0.3.1
type RowDecoder interface { DecodeRowsMapAndSink( rows pgx.Rows, sink func(values map[string]any) error, ) error DecodeRowsAndSink( rows pgx.Rows, sink func(values []any) error, ) error Decode( rawRow [][]byte, ) ([]any, error) DecodeAndSink( rawRow [][]byte, sink func(values []any) error, ) error DecodeMapAndSink( rawRow [][]byte, sink func(values map[string]any) error, ) error }
type RowDecoderFactory ¶ added in v0.4.0
type RowDecoderFactory = func(fields []pgconn.FieldDescription) (RowDecoder, error)
type Timetz ¶ added in v0.3.1
func (Timetz) MarshalJSON ¶ added in v0.3.1
func (*Timetz) ScanTimetz ¶ added in v0.3.1
func (Timetz) TimetzValue ¶ added in v0.3.1
func (*Timetz) UnmarshalJSON ¶ added in v0.3.1
type TimetzCodec ¶ added in v0.3.1
type TimetzCodec struct{}
func (TimetzCodec) DecodeDatabaseSQLValue ¶ added in v0.3.1
func (TimetzCodec) DecodeValue ¶ added in v0.3.1
func (TimetzCodec) FormatSupported ¶ added in v0.3.1
func (TimetzCodec) FormatSupported( format int16, ) bool
func (TimetzCodec) PlanEncode ¶ added in v0.3.1
func (TimetzCodec) PlanEncode( _ *pgtype.Map, _ uint32, format int16, value any, ) pgtype.EncodePlan
func (TimetzCodec) PreferredFormat ¶ added in v0.3.1
func (TimetzCodec) PreferredFormat() int16
type TimetzScanner ¶ added in v0.3.1
type TimetzValuer ¶ added in v0.3.1
type TruncateMessage ¶
type TruncateMessage pglogrepl.TruncateMessage
func (TruncateMessage) String ¶ added in v0.0.12
func (m TruncateMessage) String() string
type TupleDecoderPlan ¶ added in v0.4.0
type TypeConverter ¶ added in v0.4.0
TypeConverter represents a conversion function to convert from a PostgreSQL internal OID number and value to a value according to the stream definition
type TypeFactory ¶ added in v0.3.1
type TypeManager ¶ added in v0.3.1
type TypeManager interface { ResolveDataType( oid uint32, ) (PgType, error) ResolveTypeConverter( oid uint32, ) (TypeConverter, error) NumKnownTypes() int DecodeTuples( relation *RelationMessage, tupleData *pglogrepl.TupleData, ) (map[string]any, error) GetOrPlanTupleDecoder(relation *RelationMessage) (TupleDecoderPlan, error) GetOrPlanRowDecoder(fields []pgconn.FieldDescription) (RowDecoder, error) RegisterColumnType(column schema.ColumnAlike) error }
type TypeMessage ¶
type TypeMessage pglogrepl.TypeMessage
func (TypeMessage) String ¶ added in v0.0.12
func (m TypeMessage) String() string
type UpdateMessage ¶
type UpdateMessage struct { *pglogrepl.UpdateMessage OldValues map[string]any NewValues map[string]any }
func (UpdateMessage) String ¶ added in v0.0.12
func (m UpdateMessage) String() string
type Xml ¶ added in v0.3.1
func (Xml) MarshalJSON ¶ added in v0.3.1
func (*Xml) UnmarshalJSON ¶ added in v0.3.1
type XmlCodec ¶ added in v0.3.1
type XmlCodec struct{}