1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

Create feed query builder

This commit is contained in:
Shizun Ge 2021-01-18 15:22:09 -06:00 committed by GitHub
parent 433de17562
commit 02a4c9db53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 343 additions and 306 deletions

View file

@ -26,9 +26,9 @@ func (s *Storage) CountAllEntries() map[string]int64 {
defer rows.Close()
results := make(map[string]int64)
results["unread"] = 0
results["read"] = 0
results["removed"] = 0
results[model.EntryStatusUnread] = 0
results[model.EntryStatusRead] = 0
results[model.EntryStatusRemoved] = 0
for rows.Next() {
var status string
@ -41,7 +41,7 @@ func (s *Storage) CountAllEntries() map[string]int64 {
results[status] = count
}
results["total"] = results["unread"] + results["read"] + results["removed"]
results["total"] = results[model.EntryStatusUnread] + results[model.EntryStatusRead] + results[model.EntryStatusRemoved]
return results
}