query

package
v0.41.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: BSD-2-Clause, BSD-3-Clause, PostgreSQL Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRows = errors.New("no rows returned")

Functions

This section is empty.

Types

type Row

type Row []string

func (Row) GetBool

func (r Row) GetBool(idx int) bool

func (Row) GetFloat

func (r Row) GetFloat(idx int) float64

func (Row) GetInt

func (r Row) GetInt(idx int) int

func (Row) GetString

func (r Row) GetString(idx int) string

type Runner

type Runner struct {
	User     string
	Host     string
	Port     int
	Password string
	Database string
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(user, host string, port int) *Runner

func (*Runner) Exec

func (qr *Runner) Exec(sql string) error

func (*Runner) InDB

func (qr *Runner) InDB(dbname string) *Runner

func (*Runner) PingSuper

func (qr *Runner) PingSuper() error

func (*Runner) Query

func (qr *Runner) Query(sql string) ([]Row, error)

func (*Runner) QueryRow

func (qr *Runner) QueryRow(sql string) (Row, error)

Jump to

Keyboard shortcuts

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