Documentation ¶
Index ¶
- type Dao
- func (d *Dao) BaseInfoEnd(c context.Context, date time.Time) (end int, err error)
- func (d *Dao) BaseInfoStart(c context.Context, date time.Time) (start int, err error)
- func (d *Dao) BeginTran(c context.Context) (tx *sql.Tx, err error)
- func (d *Dao) Close()
- func (d *Dao) DelPastRecord(c context.Context, date time.Time) (rows int64, err error)
- func (d *Dao) DelPastStat(c context.Context, limit int64) (rows int64, err error)
- func (d *Dao) DelRatingCom(c context.Context, table string, date time.Time, limit int) (rows int64, err error)
- func (d *Dao) DelRatings(c context.Context, date time.Time, limit int) (rows int64, err error)
- func (d *Dao) DelTrend(c context.Context, table string, limit int) (rows int64, err error)
- func (d *Dao) GetAllParamter(c context.Context) (paramters map[string]int64, err error)
- func (d *Dao) GetBaseInfo(c context.Context, month time.Month, start, end, limit int) (bs []*model.BaseInfo, id int, err error)
- func (d *Dao) GetBaseTotal(c context.Context, date time.Time, id, limit int64) (bs []*model.BaseInfo, err error)
- func (d *Dao) GetPastRecord(c context.Context, cdate string) (times int, err error)
- func (d *Dao) GetPasts(c context.Context, offset, limit int64) (past []*model.Past, last int64, err error)
- func (d *Dao) GetRatings(c context.Context, date time.Time, offset, limit int) (rs []*model.Rating, last int, err error)
- func (d *Dao) GetRatingsFast(c context.Context, date time.Time, start, end, limit int) (rs []*model.Rating, id int, err error)
- func (d *Dao) InsertPastRecord(c context.Context, times int, cdate string) (rows int64, err error)
- func (d *Dao) InsertPastScoreStat(c context.Context, values string) (rows int64, err error)
- func (d *Dao) InsertRatingStat(c context.Context, month time.Month, values string) (rows int64, err error)
- func (d *Dao) InsertRatingStatis(c context.Context, values string) (rows int64, err error)
- func (d *Dao) InsertTaskStatus(c context.Context, val string) (rows int64, err error)
- func (d *Dao) InsertTopRating(c context.Context, values string) (rows int64, err error)
- func (d *Dao) InsertTrend(c context.Context, table string, values string) (rows int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) RatingCount(c context.Context, date time.Time) (count int, err error)
- func (d *Dao) RatingEnd(c context.Context, date time.Time) (end int, err error)
- func (d *Dao) RatingStart(c context.Context, date time.Time) (start int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao
func (*Dao) BaseInfoEnd ¶
BaseInfoEnd get end id by date
func (*Dao) BaseInfoStart ¶
BaseInfoStart get start id by date
func (*Dao) DelPastRecord ¶
DelPastRecord del past record
func (*Dao) DelPastStat ¶
DelPastStat del past stat
func (*Dao) DelRatingCom ¶
func (d *Dao) DelRatingCom(c context.Context, table string, date time.Time, limit int) (rows int64, err error)
DelRatingCom del rating common by date
func (*Dao) DelRatings ¶
DelRatings del ratings
func (*Dao) GetAllParamter ¶
GetAllParamter get all paramter
func (*Dao) GetBaseInfo ¶
func (d *Dao) GetBaseInfo(c context.Context, month time.Month, start, end, limit int) (bs []*model.BaseInfo, id int, err error)
GetBaseInfo get rating info
func (*Dao) GetBaseTotal ¶
func (d *Dao) GetBaseTotal(c context.Context, date time.Time, id, limit int64) (bs []*model.BaseInfo, err error)
GetBaseTotal get total
func (*Dao) GetPastRecord ¶
GetPastRecord batch insert past score stat
func (*Dao) GetPasts ¶
func (d *Dao) GetPasts(c context.Context, offset, limit int64) (past []*model.Past, last int64, err error)
GetPasts get past statistics
func (*Dao) GetRatings ¶
func (d *Dao) GetRatings(c context.Context, date time.Time, offset, limit int) (rs []*model.Rating, last int, err error)
GetRatings get ratings by date
func (*Dao) GetRatingsFast ¶
func (d *Dao) GetRatingsFast(c context.Context, date time.Time, start, end, limit int) (rs []*model.Rating, id int, err error)
GetRatingsFast get rating fast
func (*Dao) InsertPastRecord ¶
InsertPastRecord insert past record date and times
func (*Dao) InsertPastScoreStat ¶
InsertPastScoreStat batch insert past score stat
func (*Dao) InsertRatingStat ¶
func (d *Dao) InsertRatingStat(c context.Context, month time.Month, values string) (rows int64, err error)
InsertRatingStat batch insert rating score stat
func (*Dao) InsertRatingStatis ¶
InsertRatingStatis batch insert rating statistics
func (*Dao) InsertTaskStatus ¶
InsertTaskStatus insert task status
func (*Dao) InsertTopRating ¶
InsertTopRating insert rating top
func (*Dao) InsertTrend ¶
InsertTrend insert asc values
func (*Dao) RatingCount ¶
RatingCount get end id by date