diff options
Diffstat (limited to 'src/hub/src/spreadspace.org/sfive/s5store.go')
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5store.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5store.go b/src/hub/src/spreadspace.org/sfive/s5store.go index dda9247..62b3987 100644 --- a/src/hub/src/spreadspace.org/sfive/s5store.go +++ b/src/hub/src/spreadspace.org/sfive/s5store.go @@ -348,6 +348,11 @@ func (st *Store) insertClients(tx *bolt.Tx, uID int64, cd []Client) error { return b.Put(itob(uID), jsonData) } +func (st *Store) updateTimestampIndex(tx *bolt.Tx, ts time.Time, uID int64) error { + // TODO: implement this + return nil +} + func (st *Store) setLastUpdateForUUID(tx *bolt.Tx, uuid string, uID int64) error { b := tx.Bucket([]byte(latestUpdatesBn)) b.FillPercent = 1.0 // we only do appends @@ -378,6 +383,10 @@ func (st *Store) appendItem(tx *bolt.Tx, uf *UpdateFull) (uID int64, err error) return } + if err = st.updateTimestampIndex(tx, uf.StartTime, uID); err != nil { + return + } + if uf.SourceHubUUID != "" { err = st.setLastUpdateForUUID(tx, uf.SourceHubUUID, u.SourceHubUpdateID) } |