Documentation ¶
Index ¶
- type Repository
- func (r Repository[M]) BulkInsert(ctx app.Context, models []M) error
- func (r Repository[M]) Delete(ctx app.Context, id app.ID) error
- func (r Repository[M]) DeleteWhere(ctx app.Context, params filterPkg.Params) error
- func (r Repository[M]) Fetch(ctx app.Context, id app.ID) (M, error)
- func (r Repository[M]) FetchForUpdate(ctx app.Context, id app.ID) (M, error)
- func (r Repository[M]) Filter(ctx app.Context, params filterPkg.Params) ([]M, error)
- func (r Repository[M]) FilterExpectAtMostOne(ctx app.Context, params filterPkg.Params) (M, error)
- func (r Repository[M]) FilterExpectOne(ctx app.Context, params filterPkg.Params) (M, error)
- func (r Repository[M]) FilterForUpdate(ctx app.Context, params filterPkg.Params) ([]M, error)
- func (r Repository[M]) Insert(ctx app.Context, model M) (M, error)
- func (r Repository[M]) Update(ctx app.Context, id app.ID, model M) (M, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository[M any] struct { // contains filtered or unexported fields }
func NewTabularRepository ¶
func NewTabularRepository[M any]() Repository[M]
func (Repository[M]) BulkInsert ¶
func (r Repository[M]) BulkInsert(ctx app.Context, models []M) error
func (Repository[M]) DeleteWhere ¶
func (Repository[M]) FetchForUpdate ¶
func (Repository[M]) FilterExpectAtMostOne ¶
func (Repository[M]) FilterExpectOne ¶
func (Repository[M]) FilterForUpdate ¶
Click to show internal directories.
Click to hide internal directories.