MCPcopy Index your code
hub / github.com/syncthing/syncthing / needSizeLocal

Method needSizeLocal

internal/db/sqlite/folderdb_counts.go:65–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65func (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
79func (s *folderDB) needSizeRemote(device protocol.DeviceID) (db.Counts, error) {
80 var res []countsRow

Callers 1

CountNeedMethod · 0.95

Calls 4

summarizeCountsFunction · 0.85
stmtMethod · 0.80
wrapFunction · 0.70
SelectMethod · 0.65

Tested by

no test coverage detected