Documentation ¶
Index ¶
- type TblBaseService
- func (s *TblBaseService) Delete(ctx context.Context, where interface{}) error
- func (s *TblBaseService) DeletePri(ctx context.Context, id uint) error
- func (s *TblBaseService) DetailPri(ctx context.Context, id uint, pointer interface{}) error
- func (s *TblBaseService) Exists(ctx context.Context, where interface{}) (bool, error)
- func (s *TblBaseService) ExistsPri(ctx context.Context, id uint) (bool, error)
- func (s *TblBaseService) ListAndTotal(ctx context.Context, in model.CommonListAndTotalInput, pointer interface{}, ...) error
- func (s *TblBaseService) Save(ctx context.Context, data interface{}) error
- func (s *TblBaseService) Scan(ctx context.Context, where, pointer interface{}) error
- func (s *TblBaseService) ScanOmitEmpty(ctx context.Context, where, pointer interface{}) error
- func (s *TblBaseService) Total(ctx context.Context, where interface{}) (int, error)
- func (s *TblBaseService) TotalPri(ctx context.Context, id ...uint) (int, error)
- func (s *TblBaseService) Update(ctx context.Context, where, data interface{}) error
- func (s *TblBaseService) UpdatePri(ctx context.Context, id uint, column string, value interface{}) error
- func (s *TblBaseService) WhereErr(where interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TblBaseService ¶
type TblBaseService struct { Table string // contains filtered or unexported fields }
TblBaseService 数据表基础查询操作
func (*TblBaseService) Delete ¶
func (s *TblBaseService) Delete(ctx context.Context, where interface{}) error
Delete 删除数据
func (*TblBaseService) DeletePri ¶
func (s *TblBaseService) DeletePri(ctx context.Context, id uint) error
DeletePri 根据主键ID删除数据(唯一主键有效)
func (*TblBaseService) DetailPri ¶
func (s *TblBaseService) DetailPri(ctx context.Context, id uint, pointer interface{}) error
DetailPri 通过主键ID获取详情
func (*TblBaseService) Exists ¶
func (s *TblBaseService) Exists(ctx context.Context, where interface{}) (bool, error)
Exists 检测数据是否存在
func (*TblBaseService) ListAndTotal ¶
func (s *TblBaseService) ListAndTotal(ctx context.Context, in model.CommonListAndTotalInput, pointer interface{}, total *int) error
ListAndTotal 获取数据列表和数量
func (*TblBaseService) Save ¶
func (s *TblBaseService) Save(ctx context.Context, data interface{}) error
Save 更新数据-基础操作
func (*TblBaseService) Scan ¶
func (s *TblBaseService) Scan(ctx context.Context, where, pointer interface{}) error
Scan 获取并扫描数据
func (*TblBaseService) ScanOmitEmpty ¶
func (s *TblBaseService) ScanOmitEmpty(ctx context.Context, where, pointer interface{}) error
ScanOmitEmpty 过滤条件为空并获取数据
func (*TblBaseService) Total ¶
func (s *TblBaseService) Total(ctx context.Context, where interface{}) (int, error)
Total 获取数据总数
func (*TblBaseService) Update ¶
func (s *TblBaseService) Update(ctx context.Context, where, data interface{}) error
Update 更新数据-简单操作
func (*TblBaseService) UpdatePri ¶
func (s *TblBaseService) UpdatePri(ctx context.Context, id uint, column string, value interface{}) error
UpdatePri 根据主键ID更新数据(唯一主键有效)
func (*TblBaseService) WhereErr ¶
func (s *TblBaseService) WhereErr(where interface{}) error
WhereErr 条件查询错误
Click to show internal directories.
Click to hide internal directories.