Skip to content

Commit

Permalink
pkg/db- version- add allbypackage
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Aug 8, 2021
1 parent 3c69eab commit 31e3cf0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/db/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ func (v Version) All() []*Version {
return res
}

func (v Version) ActiveByPackage(p *Package) []*Version {
func (v Version) AllByPackage(p *Package) []*Version {
arr := dbstorage.ScanAll(v.b().Wh("p_for", p.UUID.String()), Version{})
res := []*Version{}
for _, item := range arr {
res = append(res, item.(*Version))
}
return res
}

func (v Version) ActiveByPackage_(p *Package) []*Version {
arr := dbstorage.ScanAll(v.b().Wh("p_for", p.UUID.String()), Version{})
res := []*Version{}
for _, item := range arr {
Expand Down

0 comments on commit 31e3cf0

Please sign in to comment.