dberrs

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package dberrs help processing database errors

Index

Constants

This section is empty.

Variables

View Source
var (
	NonError = errors.New("non error")
)

Only tested for mysql

Functions

func AllowHasEffects added in v0.6.3

func AllowHasEffects(c int64, err error) error

func AllowNoAffects added in v0.6.3

func AllowNoAffects(c int64, err error) error

func AllowNoRows added in v0.6.3

func AllowNoRows(err error) error

func AllowNonExists added in v0.6.3

func AllowNonExists(exist bool, err error) error

func DuplicateKeyError

func DuplicateKeyError(exec gomodel.Executor, err error, key string, newErr error) error

func DuplicateKeyFunc

func DuplicateKeyFunc(exec gomodel.Executor, err error, keyfunc func(key string) error) error

func DuplicatePrimaryKeyError

func DuplicatePrimaryKeyError(exec gomodel.Executor, err error, newErr error) error

func ForeignKeyError

func ForeignKeyError(exec gomodel.Executor, err error, key string, newErr error) error

func ForeignKeyFunc

func ForeignKeyFunc(exec gomodel.Executor, err error, keyfunc func(key string) error) error

func HasAffects

func HasAffects(c int64, err, newErr error) error

func NoAffects

func NoAffects(c int64, err, newErr error) error

func NoRows

func NoRows(err, newErr error) error

func NonExists added in v0.6.3

func NonExists(exist bool, err, newErr error) error

func PrimaryKey

func PrimaryKey(exec gomodel.Executor) string

Types

type KeyParser

type KeyParser func(err error) (key string)

Jump to

Keyboard shortcuts

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