pg

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidOption = errors.New("invalid role option")

Functions

func Initialize

func Initialize(logger *zap.SugaredLogger)

func ResultValueToString

func ResultValueToString(value interface{}) (s string, err error)

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func NewConn

func NewConn(connParams Dsn, retries uint, delay time.Duration) (c *Conn)

func (*Conn) Connect

func (c *Conn) Connect()

func (*Conn) DSN

func (c *Conn) DSN() (dsn string)

func (*Conn) RunQueryGetOneField

func (c *Conn) RunQueryGetOneField(query string, args ...interface{}) (result OneFieldResults, err error)

type Dsn

type Dsn map[string]string

type OneFieldResult

type OneFieldResult map[string]string

func NewOneFieldResultFromByteArrayArray

func NewOneFieldResultFromByteArrayArray(cols []string, values []interface{}) (ofr OneFieldResult, err error)

func (OneFieldResult) Columns

func (ofr OneFieldResult) Columns() (result []string)

func (OneFieldResult) Compare

func (ofr OneFieldResult) Compare(other OneFieldResult) (err error)

func (OneFieldResult) String

func (ofr OneFieldResult) String() (s string)

type OneFieldResults

type OneFieldResults []OneFieldResult

func (OneFieldResults) Compare

func (results OneFieldResults) Compare(other OneFieldResults) (err error)

func (OneFieldResults) String

func (results OneFieldResults) String() (s string)

Jump to

Keyboard shortcuts

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