utils

package
v0.0.0-...-e8a41ca Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChInt8        = "Int8"
	ChInt16       = "Int16"
	ChInt32       = "Int32"
	ChInt64       = "Int64"
	ChUInt8       = "UInt8"
	ChUInt16      = "UInt16"
	ChUint32      = "UInt32"
	ChUint64      = "UInt64"
	ChFloat32     = "Float32"
	ChFloat64     = "Float64"
	ChFixedString = "FixedString"
	ChString      = "String"
	ChDate        = "Date"
	ChDateTime    = "DateTime"
	ChDecimal     = "Decimal"
	ChUUID        = "UUID"
	ChUInt8Array  = "Array(UInt8)"

	PgSmallint                 = "smallint"
	PgInteger                  = "integer"
	PgBigint                   = "bigint"
	PgCharacterVarying         = "character varying"
	PgVarchar                  = "varchar"
	PgText                     = "text"
	PgReal                     = "real"
	PgDoublePrecision          = "double precision"
	PgTimestamp                = "timestamp"
	PgTimestampWithTimeZone    = "timestamp with time zone"
	PgTimestampWithoutTimeZone = "timestamp without time zone"
	PgDate                     = "date"
	PgTime                     = "time"
	PgTimeWithoutTimeZone      = "time without time zone"
	PgTimeWithTimeZone         = "time with time zone"
	PgInterval                 = "interval"
	PgBoolean                  = "boolean"
	PgDecimal                  = "decimal"
	PgNumeric                  = "numeric"
	PgCharacter                = "character"
	PgChar                     = "char"
	PgJsonb                    = "jsonb"
	PgJson                     = "json"
	PgUuid                     = "uuid"
	PgBytea                    = "bytea"
	PgInet                     = "inet"
)
View Source
const (
	// OutputPlugin contains logical decoder plugin name
	OutputPlugin = "pgoutput"
)

Variables

This section is empty.

Functions

func DecodeCopy

func DecodeCopy(in []byte) ([]sql.NullString, error)

DecodeCopy extracts fields from the postgresql text copy format based on DecodeCopy from https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/copy.go

func QuoteLiteral

func QuoteLiteral(str string) string

QuoteLiteral quotes string literal

Types

type LSN

type LSN uint64
const (
	InvalidLSN LSN = 0
)

func (*LSN) Bytes

func (l *LSN) Bytes() []byte

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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