Documentation
¶
Index ¶
- Variables
- type Basic
- func (b *Basic[A]) Begin() Tx[A]
- func (b *Basic[A]) Create(src *A, opts ...func(*g.DB) *g.DB) error
- func (b *Basic[A]) Delete(conds ...interface{}) error
- func (b *Basic[A]) End(rErr error) error
- func (b *Basic[A]) Find(pgn gorm.Pagination, opts ...func(*g.DB) *g.DB) ([]*A, *gorm.Pagination, error)
- func (b *Basic[A]) Get(conds ...interface{}) (*A, error)
- func (b *Basic[A]) Transact(f func(tx CRUD[A]) error) (rErr error)
- func (b *Basic[A]) Update(upd A, opts ...func(*g.DB) *g.DB) error
- type CRUD
- type Tx
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[A any] gorm.Backend
Click to show internal directories.
Click to hide internal directories.