Documentation ¶
Index ¶
- Variables
- type CRUDStore
- func (c CRUDStore[T]) Delete(ctx context.Context, model *T) error
- func (c CRUDStore[T]) FindAll(ctx context.Context, sc ...SelectCriteria) ([]T, error)
- func (c CRUDStore[T]) FindOne(ctx context.Context, sc ...SelectCriteria) (T, error)
- func (c CRUDStore[T]) Save(ctx context.Context, model *T) error
- func (c CRUDStore[T]) Update(ctx context.Context, model *T) error
- type ICRUDStore
- type SelectCriteria
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRecordNotFound = errors.New("record not found")
Functions ¶
This section is empty.
Types ¶
type CRUDStore ¶
func (CRUDStore[T]) FindAll ¶
func (c CRUDStore[T]) FindAll(ctx context.Context, sc ...SelectCriteria) ([]T, error)
type ICRUDStore ¶
type SelectCriteria ¶
type SelectCriteria func(*bun.SelectQuery) *bun.SelectQuery
Click to show internal directories.
Click to hide internal directories.