pg: github.com/go-pg/pg/internal Index | Files | Directories

package internal

import "github.com/go-pg/pg/internal"

internal is a private internal package.

Index

Package Files

error.go internal.go log.go strconv.go underscore.go unsafe.go util.go

Variables

var (
    ErrNoRows    = Errorf("pg: no rows in result set")
    ErrMultiRows = Errorf("pg: multiple rows in result set")
)
var Deprecated = log.New(os.Stderr, "DEPRECATED: pg: ", log.LstdFlags)
var Warn = log.New(os.Stderr, "WARN: pg: ", log.LstdFlags)

func AssertOneRow Uses

func AssertOneRow(l int) error

func Atoi Uses

func Atoi(b []byte) (int, error)

func BytesToString Uses

func BytesToString(b []byte) string

BytesToString converts byte slice to string.

func CamelCased Uses

func CamelCased(s string) string

func IsLower Uses

func IsLower(c byte) bool

func IsUpper Uses

func IsUpper(c byte) bool

func MakeSliceNextElemFunc Uses

func MakeSliceNextElemFunc(v reflect.Value) func() reflect.Value

func ParseFloat Uses

func ParseFloat(b []byte, bitSize int) (float64, error)

func ParseInt Uses

func ParseInt(b []byte, base int, bitSize int) (int64, error)

func ParseUint Uses

func ParseUint(b []byte, base int, bitSize int) (uint64, error)

func RetryBackoff Uses

func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration

func Sleep Uses

func Sleep(ctx context.Context, dur time.Duration) error

func StringToBytes Uses

func StringToBytes(s string) []byte

StringToBytes converts string to byte slice.

func ToExported Uses

func ToExported(s string) string

func ToLower Uses

func ToLower(c byte) byte

func ToUpper Uses

func ToUpper(c byte) byte

func Underscore Uses

func Underscore(s string) string

Underscore converts "CamelCasedString" to "camel_cased_string".

func Unwrap Uses

func Unwrap(err error) error

func UpperString Uses

func UpperString(s string) string

func WithSpan Uses

func WithSpan(
    ctx context.Context,
    name string,
    fn func(context.Context, trace.Span) error,
) error

type Error Uses

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

func Errorf Uses

func Errorf(s string, args ...interface{}) Error

func (Error) Error Uses

func (err Error) Error() string

type Logging Uses

type Logging interface {
    Printf(ctx context.Context, format string, v ...interface{})
}
var Logger Logging = &logger{
    log: log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile),
}

type PGError Uses

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

func NewPGError Uses

func NewPGError(m map[byte]string) PGError

func (PGError) Error Uses

func (err PGError) Error() string

func (PGError) Field Uses

func (err PGError) Field(k byte) string

func (PGError) IntegrityViolation Uses

func (err PGError) IntegrityViolation() bool

Directories

PathSynopsis
parser
pool

Package internal imports 11 packages (graph) and is imported by 74 packages. Updated 2020-11-24. Refresh now. Tools for package owners.