pg

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 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{}) string

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() (err error)

func (*Conn) DSN

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

func (*Conn) RunQueryGetOneField

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

type Dsn

type Dsn map[string]string

type Result added in v0.3.0

type Result map[string]string

func NewResultFromByteArrayArray added in v0.3.0

func NewResultFromByteArrayArray(cols []string, values []interface{}) (ofr Result, err error)

func (Result) Columns added in v0.3.0

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

func (Result) Compare added in v0.3.0

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

type Results added in v0.3.0

type Results []Result

func (Results) Compare added in v0.3.0

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

func (Results) String added in v0.3.0

func (results Results) String() (s string)

Jump to

Keyboard shortcuts

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