()
| 38 | } |
| 39 | |
| 40 | func (repo *SqliteRepo) GetTotalDownloadedSize() (int64, error) { |
| 41 | var total int64 |
| 42 | err := repo.db.QueryRow("SELECT IFNULL(sum(size), 0) FROM files WHERE done = true"). |
| 43 | Scan(&total) |
| 44 | if err != nil { |
| 45 | return 0, err |
| 46 | } |
| 47 | return total, nil |
| 48 | } |
| 49 | |
| 50 | func (repo *SqliteRepo) GetTotalDownladedFiles() (int64, error) { |
| 51 | var total int64 |
no outgoing calls
no test coverage detected