pg

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Connect(ctx context.Context) error
	IsClosed() bool
	Close(ctx context.Context) error
	ReceiveMessage(ctx context.Context) (pgproto3.BackendMessage, error)
	Frontend() *pgproto3.Frontend
	Exec(ctx context.Context, sql string) *pgconn.MultiResultReader
}

func NewConnection

func NewConnection(ctx context.Context, dsn string) (Connection, error)

func NewConnectionTemplate

func NewConnectionTemplate(dsn string) Connection

type IdentifySystemResult

type IdentifySystemResult struct {
	SystemID string
	Database string

	Timeline int32
	// contains filtered or unexported fields
}

func IdentifySystem

func IdentifySystem(ctx context.Context, conn Connection) (IdentifySystemResult, error)

func ParseIdentifySystem

func ParseIdentifySystem(mrr *pgconn.MultiResultReader) (IdentifySystemResult, error)

func (*IdentifySystemResult) LoadXLogPos

func (isr *IdentifySystemResult) LoadXLogPos() LSN

func (*IdentifySystemResult) SetXLogPos

func (isr *IdentifySystemResult) SetXLogPos(l LSN)

func (*IdentifySystemResult) UpdateXLogPos

func (isr *IdentifySystemResult) UpdateXLogPos(l LSN)

type LSN

type LSN uint64

func ParseLSN

func ParseLSN(s string) (LSN, error)

func (LSN) String

func (lsn LSN) String() string

Jump to

Keyboard shortcuts

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