errors

package
v0.0.0-...-e46c3b8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrConstraint

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

ErrConstraint is used to report that a check constaint was violated.

func (ErrConstraint) Error

func (err ErrConstraint) Error() string

func (ErrConstraint) Query

func (err ErrConstraint) Query() *Query

Query implements EmptyResultErr.

func (ErrConstraint) Unwrap

func (err ErrConstraint) Unwrap() error

Unwrap implements EmptyResultErr.

type ErrExists

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

ErrExists is used to report that a record alredy exists.

func (ErrExists) Error

func (err ErrExists) Error() string

func (ErrExists) Query

func (err ErrExists) Query() *Query

Query implements EmptyResultErr.

func (ErrExists) Unwrap

func (err ErrExists) Unwrap() error

Unwrap implements EmptyResultErr.

type ErrNotFound

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

ErrNotFound reports that query returned empty result.

func (ErrNotFound) Error

func (err ErrNotFound) Error() string

func (ErrNotFound) Query

func (err ErrNotFound) Query() *Query

Query implements EmptyResultErr.

func (ErrNotFound) Unwrap

func (err ErrNotFound) Unwrap() error

Unwrap implements EmptyResultErr.

type ErrTimeout

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

ErrTimeout is used to report that query timeouted.

func (ErrTimeout) Error

func (err ErrTimeout) Error() string

func (ErrTimeout) Query

func (err ErrTimeout) Query() *Query

Query implements EmptyResultErr.

func (ErrTimeout) Unwrap

func (err ErrTimeout) Unwrap() error

Unwrap implements EmptyResultErr.

type Query

type Query struct {
	SQL  string
	Args []interface{}
}

Query represents SQL query.

func (*Query) Text

func (q *Query) Text() string

Text returns valid SQL query text with bound paramiters.

type QueryErr

type QueryErr interface {
	Query() *Query
	Error() string
	Unwrap() error
}

QueryErr represents error from executing a mysql qry.

func Wrap

func Wrap(err error, sqlText string, args []interface{}) QueryErr

Wrap wraps the given error.

type UnknownErr

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

UnknownErr represents MySQL error wich is not recognized.

func (UnknownErr) Error

func (err UnknownErr) Error() string

func (UnknownErr) Query

func (err UnknownErr) Query() *Query

Query implements EmptyResultErr.

func (UnknownErr) Unwrap

func (err UnknownErr) Unwrap() error

Jump to

Keyboard shortcuts

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