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:
parent
433de17562
commit
02a4c9db53
5 changed files with 343 additions and 306 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue