Count 总数量 常用的方法,所以避免直接查询数据库
()
| 372 | // Count 总数量 |
| 373 | // 常用的方法,所以避免直接查询数据库 |
| 374 | func (this *SQLiteFileList) Count() (int64, error) { |
| 375 | var total int64 |
| 376 | for _, db := range this.dbList { |
| 377 | count, err := db.Total() |
| 378 | if err != nil { |
| 379 | return 0, err |
| 380 | } |
| 381 | total += count |
| 382 | } |
| 383 | return total, nil |
| 384 | } |
| 385 | |
| 386 | // IncreaseHit 增加点击量 |
| 387 | func (this *SQLiteFileList) IncreaseHit(hash string) error { |