crud

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound         = errors.New("not found")
	ErrFound            = errors.New("found")
	ErrUpdateNotApplied = errors.New("update not applied")
)

Errors returned by CRUD

Functions

This section is empty.

Types

type Basic

type Basic[M any] gorm.Backend

func (Basic[A]) Create

func (b Basic[A]) Create(src *A, opts ...func(*g.DB) *g.DB) error

func (Basic[A]) Delete

func (b Basic[A]) Delete(conds ...interface{}) error

func (Basic[A]) Get

func (b Basic[A]) Get(conds ...interface{}) (*A, error)

func (Basic[A]) Update

func (b Basic[A]) Update(upd A, opts ...func(*g.DB) *g.DB) error

Jump to

Keyboard shortcuts

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