Documentation ¶
Index ¶
- Variables
- type IUserRepo
- type UserRepo
- func (p *UserRepo) Count(ctx context.Context, where entity.UserEntity) (total int64, err error)
- func (p *UserRepo) Delete(ctx context.Context, where entity.UserEntity) (int64, error)
- func (p *UserRepo) Find(ctx context.Context, where entity.UserEntity, order []string) (result *entity.UserEntity, err error)
- func (p *UserRepo) FindAll(ctx context.Context, where entity.UserEntity, order []string, opt ...int) (result []entity.UserEntity, err error)
- func (p *UserRepo) Insert(ctx context.Context, entity *entity.UserEntity) (int64, error)
- func (p *UserRepo) PDelete(ctx context.Context, where entity.UserEntity) (int64, error)
- func (p *UserRepo) SelectPage(ctx context.Context, query *gplus.QueryCond[entity.UserEntity], ...) (*gplus.Page[entity.UserEntity], error)
- func (p *UserRepo) Update(ctx context.Context, where entity.UserEntity, update entity.UserEntity) (int64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( cache.CacheProvider, gorm.Provider, UserRepoProvider, )
View Source
var UserRepoProvider = wire.NewSet(NewUserRepo, wire.Bind(new(IUserRepo), new(*UserRepo)))
UserRepoProvider
Functions ¶
This section is empty.
Types ¶
type IUserRepo ¶
type IUserRepo interface { Count(ctx context.Context, where entity.UserEntity) (total int64, err error) Find(ctx context.Context, where entity.UserEntity, order []string) ( result *entity.UserEntity, err error) FindAll(ctx context.Context, where entity.UserEntity, order []string, opt ...int) (result []entity.UserEntity, err error) Insert(ctx context.Context, entity *entity.UserEntity) (int64, error) Update(ctx context.Context, where entity.UserEntity, update entity.UserEntity) (int64, error) Delete(ctx context.Context, where entity.UserEntity) (int64, error) PDelete(ctx context.Context, where entity.UserEntity) (int64, error) SelectPage(ctx context.Context, query *gplus.QueryCond[entity.UserEntity], limit, offset int) (*gplus.Page[entity.UserEntity], error) }
IUserRepo
type UserRepo ¶
type UserRepo struct { gplus.Dao[entity.UserEntity] // contains filtered or unexported fields }
UserRepo
func (*UserRepo) Find ¶
func (p *UserRepo) Find(ctx context.Context, where entity.UserEntity, order []string) ( result *entity.UserEntity, err error)
Find * 注意:
- where条件仅可以使用非零值
- order的字段名需要同数据库字段名一致
func (*UserRepo) FindAll ¶
func (p *UserRepo) FindAll(ctx context.Context, where entity.UserEntity, order []string, opt ...int) (result []entity.UserEntity, err error)
FindAll * 注意:
- where条件仅可以使用非零值
- order的字段名需要同数据库字段名一致
func (*UserRepo) SelectPage ¶
Click to show internal directories.
Click to hide internal directories.