Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Divider = "==============================================="

Variables

This section is empty.

Functions

func PsqlEncode

func PsqlEncode(w io.Writer, resultSet ResultSet, params map[string]string, dsn string) error

PsqlEncode does a single value query using psql, writing the captured output to the writer.

func PsqlEncodeAll

func PsqlEncodeAll(w io.Writer, resultSet ResultSet, params map[string]string, dsn string) error

PsqlEncodeAll does a values query for each of the values in the result set, writing captured output to the writer.

Types

type ResultSet

type ResultSet interface {
	Next() bool
	Scan(...interface{}) error
	Columns() ([]string, error)
	Close() error
	Err() error
	NextResultSet() bool
}

ResultSet is the shared interface for a result set.

type Rset

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

Rset is a result set.

func NewRset

func NewRset(cols []string, vals ...[][]interface{}) *Rset

NewRset creates a new result set

func NewRsetBig

func NewRsetBig(seed int64) *Rset

NewRsetBig creates a random, big result set using the provided seed.

func NewRsetMulti

func NewRsetMulti() *Rset

NewRsetMulti creates a result set with multiple result sets.

func NewRsetTiny

func NewRsetTiny() *Rset

NewRsetTiny creates a tiny result set.

func NewRsetWide

func NewRsetWide() *Rset

NewRsetWide creates a wide result set.

func (*Rset) Close

func (*Rset) Close() error

Err satisfies the ResultSet interface.

func (*Rset) Columns

func (r *Rset) Columns() ([]string, error)

Err satisfies the ResultSet interface.

func (*Rset) Err

func (*Rset) Err() error

Err satisfies the ResultSet interface.

func (*Rset) Next

func (r *Rset) Next() bool

Err satisfies the ResultSet interface.

func (*Rset) NextResultSet

func (r *Rset) NextResultSet() bool

Err satisfies the ResultSet interface.

func (*Rset) Reset

func (r *Rset) Reset()

Reset resets the rset so that it can be used repeatedly.

func (*Rset) Scan

func (r *Rset) Scan(vals ...interface{}) error

Err satisfies the ResultSet interface.

Jump to

Keyboard shortcuts

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