Update stores updated information about repo in DB
(repo *PublishedRepo)
| 1356 | |
| 1357 | // Update stores updated information about repo in DB |
| 1358 | func (collection *PublishedRepoCollection) Update(repo *PublishedRepo) error { |
| 1359 | batch := collection.db.CreateBatch() |
| 1360 | _ = batch.Put(repo.Key(), repo.Encode()) |
| 1361 | |
| 1362 | if repo.SourceKind == SourceLocalRepo { |
| 1363 | for component, item := range repo.sourceItems { |
| 1364 | _ = batch.Put(repo.RefKey(component), item.packageRefs.Encode()) |
| 1365 | } |
| 1366 | } |
| 1367 | return batch.Write() |
| 1368 | } |
| 1369 | |
| 1370 | // LoadShallow loads basic information on the repo's sources |
| 1371 | // |