Versions in this module Expand all Collapse all v1 v1.0.0 Aug 11, 2022 Changes in this version + type BaseRepository struct + func NewBaseRepository(orm *xorm.Engine, column map[string]search.Filter) BaseRepository + func (b *BaseRepository) Query(ctx context.Context, cq common.Query, list interface{}, count interface{}, ...) (page *common.Pagination, err error) + func (b *BaseRepository) ReadById(ctx context.Context, id int64, bean interface{}, cols ...string) (bool, error) + func (b *BaseRepository) Save(bean interface{}) (int64, error) + func (b *BaseRepository) Session(ctx context.Context) *xorm.Session + func (b *BaseRepository) TxSave(tx *xorm.Session, bean interface{}) (int64, error) + func (b *BaseRepository) TxUpdate(tx *xorm.Session, id int64, bean interface{}, cols ...string) (int64, error) + func (b *BaseRepository) Update(id int64, bean interface{}, cols ...string) (int64, error) + func (b *BaseRepository) Xorm() *xorm.Engine + type Entity struct + CreateBy int64 + CreateTime int64 + Id int64 + LastModifyBy int64 + LastModifyTime int64 + func (t *Entity) BeforeInsert() + func (t *Entity) BeforeUpdate() + type IBaseRepository interface + Query func(ctx context.Context, cq common.Query, list interface{}, count interface{}, ...) (page *common.Pagination, err error) + ReadById func(ctx context.Context, id int64, bean interface{}, cols ...string) (bool, error) + Save func(bean interface{}) (int64, error) + Session func(ctx context.Context) *xorm.Session + TxSave func(tx *xorm.Session, bean interface{}) (int64, error) + TxUpdate func(tx *xorm.Session, id int64, bean interface{}, cols ...string) (int64, error) + Update func(id int64, bean interface{}, cols ...string) (int64, error)