dberrs

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package dberrs help processing database errors

Index

Constants

View Source
const (
	NonError = errors.Err("non error")
)

Only tested for mysql

Variables

This section is empty.

Functions

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 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