Documentation
¶
Index ¶
- Constants
- type DemoEntity
- type DemoSvc
- func (d *DemoSvc) DeleteById(id int64) (bool, error)
- func (d *DemoSvc) GetById(id int64) (*DemoEntity, error)
- func (d *DemoSvc) Insert(entities ...*DemoEntity) ([]int64, error)
- func (d *DemoSvc) ListByIds(ids ...int64) ([]*DemoEntity, error)
- func (d *DemoSvc) SimpleQueryAnd(sqp *svc.SqlQueryParams) ([]*DemoEntity, error)
- func (d *DemoSvc) UpdateById(id int64, newEntity *DemoEntity, updateFields map[string]bool) (bool, error)
Constants ¶
View Source
const ( DEF_DEMO_ENTITY_CACHE_EXPIRE_SECONDS = 60 * 30 DEF_DEMO_TOTAL_ROWS_CACHE_EXPIRE_SECONDS = 60 * 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DemoEntity ¶
type DemoEntity struct { svc.SqlBaseEntity Name string `mysql:"name" json:"name" redis:"name"` Status int `mysql:"status" json:"status" redis:"status"` }
type DemoSvc ¶
type DemoSvc struct {
*svc.SqlRedisBindSvc
}
func NewDemoSvc ¶
func (*DemoSvc) SimpleQueryAnd ¶
func (d *DemoSvc) SimpleQueryAnd(sqp *svc.SqlQueryParams) ([]*DemoEntity, error)
func (*DemoSvc) UpdateById ¶
Click to show internal directories.
Click to hide internal directories.