Documentation ¶
Index ¶
- Variables
- func AssertOneRow(l int) error
- func Atoi(b []byte) (int, error)
- func BytesToString(b []byte) string
- func CamelCased(s string) string
- func IsLower(c byte) bool
- func IsUpper(c byte) bool
- func MakeSliceNextElemFunc(v reflect.Value) func() reflect.Value
- func ParseFloat(b []byte, bitSize int) (float64, error)
- func ParseInt(b []byte, base int, bitSize int) (int64, error)
- func ParseUint(b []byte, base int, bitSize int) (uint64, error)
- func QuoteTableName(s string) string
- func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration
- func Sleep(ctx context.Context, dur time.Duration) error
- func StringToBytes(s string) []byte
- func ToExported(s string) string
- func ToLower(c byte) byte
- func ToUpper(c byte) byte
- func Underscore(s string) string
- func Unwrap(err error) error
- func UpperString(s string) string
- func WithSpan(ctx context.Context, name string, fn func(context.Context, trace.Span) error) error
- type Error
- type PGError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMultiRows = Errorf("pg: multiple rows in result set")
View Source
var ErrNoRows = Errorf("pg: no rows in result set")
View Source
var Logger = log.New(os.Stderr, "pg: ", log.LstdFlags|log.Lshortfile)
Functions ¶
func AssertOneRow ¶
func BytesToString ¶
BytesToString converts byte slice to string.
func CamelCased ¶
func QuoteTableName ¶
func RetryBackoff ¶
Retry backoff with jitter sleep to prevent overloaded conditions during intervals https://www.awsarchitectureblog.com/2015/03/backoff.html
func StringToBytes ¶
StringToBytes converts string to byte slice.
func ToExported ¶
func Underscore ¶
Underscore converts "CamelCasedString" to "camel_cased_string".
func UpperString ¶
Types ¶
type PGError ¶
type PGError struct {
// contains filtered or unexported fields
}
func NewPGError ¶
func (PGError) IntegrityViolation ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.