()
| 63 | } |
| 64 | |
| 65 | func (s *folderDB) needSizeLocal() (db.Counts, error) { |
| 66 | // The need size for the local device is the sum of entries with the |
| 67 | // need bit set. |
| 68 | var res []countsRow |
| 69 | err := s.stmt(` |
| 70 | SELECT s.type, s.count, s.size, s.local_flags, s.deleted FROM counts s |
| 71 | WHERE s.local_flags & {{.FlagLocalNeeded}} != 0 |
| 72 | `).Select(&res) |
| 73 | if err != nil { |
| 74 | return db.Counts{}, wrap(err) |
| 75 | } |
| 76 | return summarizeCounts(res), nil |
| 77 | } |
| 78 | |
| 79 | func (s *folderDB) needSizeRemote(device protocol.DeviceID) (db.Counts, error) { |
| 80 | var res []countsRow |
no test coverage detected