Documentation ¶
Index ¶
- func CheckPgNoRows(title string, err error) errstack.E
- func CheckRowsAffected(title string, expected int, res orm.Result, err error) errstack.E
- func DecodeAndSave(src io.ReadCloser, dest Validated, db *pg.DB) errstack.E
- func ErrNotNoRows(title string, err error) errstack.E
- func ValidateSave(obj Validated, db *pg.DB) errstack.E
- type DBSave
- type Validated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPgNoRows ¶
CheckPgNoRows wraps pg error into errstack.E
func CheckRowsAffected ¶
CheckRowsAffected asserts that expected number of rows has been affected in the SQL operation.
func DecodeAndSave ¶
DecodeAndSave is handy model function which decodes, validates and save an object into DB. `dest` must be a pointer.
func ErrNotNoRows ¶
ErrNotNoRows check if errors is not Nil and is not ErrNoRows
Types ¶
Click to show internal directories.
Click to hide internal directories.