MCPcopy Index your code
hub / github.com/dnote/dnote / getLastMaxUSN

Function getLastMaxUSN

pkg/cli/cmd/sync/sync.go:73–81  ·  view source on GitHub ↗
(tx *database.DB)

Source from the content-addressed store, hash-verified

71}
72
73func getLastMaxUSN(tx *database.DB) (int, error) {
74 var ret int
75
76 if err := database.GetSystem(tx, consts.SystemLastMaxUSN, &ret); err != nil {
77 return ret, errors.Wrap(err, "querying last user max_usn")
78 }
79
80 return ret, nil
81}
82
83// syncList is an aggregation of resources represented in the sync fragments
84type syncList struct {

Callers 4

sendBooksFunction · 0.85
sendNotesFunction · 0.85
newRunFunction · 0.85
TestGetLastMaxUSNFunction · 0.85

Calls 1

GetSystemFunction · 0.92

Tested by 1

TestGetLastMaxUSNFunction · 0.68