this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

vet: DbCID struct fields

+8 -8
+6 -6
carstore/bs.go
··· 158 158 Model(blockRef{}). 159 159 Select("path, block_refs.offset"). 160 160 Joins("left join car_shards on block_refs.shard = car_shards.id"). 161 - Where("usr = ? AND cid = ?", uv.user, models.DbCID{k}). 161 + Where("usr = ? AND cid = ?", uv.user, models.DbCID{CID: k}). 162 162 Count(&count).Error; err != nil { 163 163 return false, err 164 164 } ··· 194 194 Model(blockRef{}). 195 195 Select("path, block_refs.offset"). 196 196 Joins("left join car_shards on block_refs.shard = car_shards.id"). 197 - Where("usr = ? AND cid = ?", uv.user, models.DbCID{k}). 197 + Where("usr = ? AND cid = ?", uv.user, models.DbCID{CID: k}). 198 198 Find(&info).Error; err != nil { 199 199 return nil, err 200 200 } ··· 712 712 // adding things to the db by map is the only way to get gorm to not 713 713 // add the 'returning' clause, which costs a lot of time 714 714 brefs = append(brefs, map[string]interface{}{ 715 - "cid": models.DbCID{k}, 715 + "cid": models.DbCID{CID: k}, 716 716 "offset": offset, 717 717 }) 718 718 ··· 725 725 } 726 726 727 727 shard := CarShard{ 728 - Root: models.DbCID{root}, 728 + Root: models.DbCID{CID: root}, 729 729 DataStart: hnw, 730 730 Seq: seq, 731 731 Path: path, ··· 1582 1582 } 1583 1583 1584 1584 nbrefs = append(nbrefs, map[string]interface{}{ 1585 - "cid": models.DbCID{blk.Cid()}, 1585 + "cid": models.DbCID{CID: blk.Cid()}, 1586 1586 "offset": offset, 1587 1587 }) 1588 1588 ··· 1596 1596 } 1597 1597 1598 1598 shard := CarShard{ 1599 - Root: models.DbCID{root}, 1599 + Root: models.DbCID{CID: root}, 1600 1600 DataStart: hnw, 1601 1601 Seq: lastsh.Seq, 1602 1602 Path: path,
+2 -2
events/dbpersist.go
··· 278 278 279 279 var prev *models.DbCID 280 280 if evt.Prev != nil && evt.Prev.Defined() { 281 - prev = &models.DbCID{cid.Cid(*evt.Prev)} 281 + prev = &models.DbCID{CID: cid.Cid(*evt.Prev)} 282 282 } 283 283 284 284 var blobs []byte ··· 296 296 } 297 297 298 298 rer := RepoEventRecord{ 299 - Commit: &models.DbCID{cid.Cid(evt.Commit)}, 299 + Commit: &models.DbCID{CID: cid.Cid(evt.Commit)}, 300 300 Prev: prev, 301 301 Repo: uid, 302 302 Type: "repo_append", // TODO: refactor to "#commit"? can "rebase" come through this path?