()
| 48 | } |
| 49 | |
| 50 | func (repo *SqliteRepo) GetTotalDownladedFiles() (int64, error) { |
| 51 | var total int64 |
| 52 | err := repo.db.QueryRow("SELECT COUNT(*) FROM files WHERE done = true"). |
| 53 | Scan(&total) |
| 54 | if err != nil { |
| 55 | return 0, err |
| 56 | } |
| 57 | return total, nil |
| 58 | } |
| 59 | |
| 60 | func (repo *SqliteRepo) MarkFileDone(file *IndexedFile) error { |
| 61 | _, err := repo.db.Exec("UPDATE files SET done = true WHERE path = ?", file.Filepath) |
no outgoing calls
no test coverage detected