Documentation
¶
Index ¶
- type BaseRepo
- func (r *BaseRepo) BulkCreate(ctx context.Context, arr []model.Model) error
- func (r *BaseRepo) Create(ctx context.Context, m model.Model) error
- func (r *BaseRepo) CreateOrUpdate(ctx context.Context, m model.Model, query interface{}, attrs ...interface{}) error
- func (r *BaseRepo) DeleteByID(ctx context.Context, m model.Model, id string) error
- func (r *BaseRepo) FindByID(ctx context.Context, m model.Model, id string, preloadFields ...string) error
- func (r *BaseRepo) FindByIDWithPreloadCondition(ctx context.Context, m model.Model, id string, ...) error
- func (r *BaseRepo) GetDB(ctx context.Context) *gorm.DB
- func (r *BaseRepo) Save(ctx context.Context, m model.Model) error
- func (r *BaseRepo) Search(ctx context.Context, val interface{}, f filter.Filter, preloadFields ...string) error
- func (r *BaseRepo) SearchAndCount(ctx context.Context, val interface{}, f filter.Filter, preloadFields ...string) (int64, error)
- func (r *BaseRepo) SearchWithPreloadCondition(ctx context.Context, val interface{}, f filter.Filter, ...) error
- func (r *BaseRepo) SearchWithPreloadConditionAndCount(ctx context.Context, val interface{}, f filter.Filter, ...) (int64, error)
- func (r *BaseRepo) Update(ctx context.Context, m model.Model, attrs ...interface{}) error
- func (r *BaseRepo) Updates(ctx context.Context, m model.Model, params interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRepo ¶
type BaseRepo struct {
// contains filtered or unexported fields
}
func NewBaseRepo ¶
func (*BaseRepo) BulkCreate ¶
func (*BaseRepo) CreateOrUpdate ¶
func (*BaseRepo) DeleteByID ¶
func (*BaseRepo) FindByIDWithPreloadCondition ¶
func (r *BaseRepo) FindByIDWithPreloadCondition(ctx context.Context, m model.Model, id string, preloadFields ...repository.PreloadField) error
func (*BaseRepo) SearchAndCount ¶
func (*BaseRepo) SearchWithPreloadCondition ¶
func (r *BaseRepo) SearchWithPreloadCondition(ctx context.Context, val interface{}, f filter.Filter, preloadFields ...repository.PreloadField) error
func (*BaseRepo) SearchWithPreloadConditionAndCount ¶
func (r *BaseRepo) SearchWithPreloadConditionAndCount(ctx context.Context, val interface{}, f filter.Filter, preloadFields ...repository.PreloadField) (int64, error)
Click to show internal directories.
Click to hide internal directories.