Documentation ¶
Index ¶
- type BaseDao
- func (d *BaseDao) BeginTx(ctx context.Context) context.Context
- func (*BaseDao) CommitTx(ctx context.Context) error
- func (d *BaseDao) Count(funcs ...func(db db.DB) db.DB) (count int64)
- func (d *BaseDao) GetByID(id uint, result Model) (bool, error)
- func (d *BaseDao) GetDB() db.DB
- func (d *BaseDao) Insert(model Model) error
- func (d *BaseDao) InsertWithCtx(ctx context.Context, model Model) error
- func (*BaseDao) RollbackTx(ctx context.Context) error
- func (d *BaseDao) Transaction(ctx context.Context, fn func(ctx context.Context) error) error
- func (d *BaseDao) UnwrapContextDBOrDefault(ctx context.Context) db.DB
- func (d *BaseDao) UpdatesByID(id uint, data Model) error
- func (d *BaseDao) UpdatesByIDWithCtx(ctx context.Context, id uint, data Model) error
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDao ¶
type BaseDao struct {
// contains filtered or unexported fields
}
func (*BaseDao) InsertWithCtx ¶
func (*BaseDao) Transaction ¶
func (*BaseDao) UnwrapContextDBOrDefault ¶
Click to show internal directories.
Click to hide internal directories.