Update stores updated information about repo in DB
(repo *LocalRepo)
| 158 | |
| 159 | // Update stores updated information about repo in DB |
| 160 | func (collection *LocalRepoCollection) Update(repo *LocalRepo) error { |
| 161 | batch := collection.db.CreateBatch() |
| 162 | _ = batch.Put(repo.Key(), repo.Encode()) |
| 163 | if repo.packageRefs != nil { |
| 164 | _ = batch.Put(repo.RefKey(), repo.packageRefs.Encode()) |
| 165 | } |
| 166 | return batch.Write() |
| 167 | } |
| 168 | |
| 169 | // LoadComplete loads additional information for local repo |
| 170 | func (collection *LocalRepoCollection) LoadComplete(repo *LocalRepo) error { |