diff options
Diffstat (limited to 'src/hub/src/spreadspace.org/sfive/s5store.go')
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5store.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5store.go b/src/hub/src/spreadspace.org/sfive/s5store.go index 3fbcf39..d30e365 100644 --- a/src/hub/src/spreadspace.org/sfive/s5store.go +++ b/src/hub/src/spreadspace.org/sfive/s5store.go @@ -510,6 +510,17 @@ func (s sqliteStore) GetLastUpdateForUuid(uuid string) (updateId *int, err error return } +func (s sqliteStore) GetLastUpdateId() (updateId *int, err error) { + result := lastUpdateQueryResult{} + err = s.db.SelectOne(&result, "select max(Id) as MaxDataUpdateId from "+dataUpdatesTn,) + if err == nil { + updateId = result.MaxDataUpdateId + } else { + s5l.Printf("db: failed to find max DataUpdateId: %v", err) + } + return +} + type statsResult struct { UpdateCount *int HubCount *int |