dbutils

package
v0.0.0-...-0d0b246 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OutputPlugin contains logical decoder plugin name
	OutputPlugin = "pgoutput"
)

Variables

This section is empty.

Functions

func CreateMissingPublication

func CreateMissingPublication(conn *pgx.Conn, publicationName string) error

CreateMissingPublication creates missing publication

func QuoteLiteral

func QuoteLiteral(str string) string

QuoteLiteral quotes string literal

Types

type LSN

type LSN uint64
const (
	InvalidLSN LSN = 0
)

func CreateSlot

func CreateSlot(conn *pgx.Conn, ctx context.Context, slotName string) (LSN, error)

CreateSlot creates a slot

func GetSlotFlushLSN

func GetSlotFlushLSN(conn *pgx.Conn, slotName, dbName string) (LSN, error)

GetSlotFlushLSN returns flush LSN of the existing replication slot

func (LSN) Hex

func (l LSN) Hex() string

func (LSN) IsValid

func (l LSN) IsValid() bool

func (LSN) MarshalYAML

func (l LSN) MarshalYAML() (interface{}, error)

func (*LSN) Parse

func (l *LSN) Parse(lsn string) error

func (*LSN) ParseHex

func (l *LSN) ParseHex(hexStr string) error

func (LSN) String

func (l LSN) String() string

func (*LSN) UnmarshalYAML

func (l *LSN) UnmarshalYAML(unmarshal func(interface{}) error) error

type OID

type OID uint32

OID describes pg oid

const InvalidOID OID = 0

InvalidOID describes invalid oid

func (*OID) Scan

func (o *OID) Scan(src interface{}) error

Scan implements the Scanner interface in order to allow pgx to read OID values from the DB.

func (OID) String

func (o OID) String() string

String implements Stringer

func (OID) Value

func (o OID) Value() (driver.Value, error)

Value implements sql Valuer

Jump to

Keyboard shortcuts

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