Using squirrel to generalize SQL search

This commit is contained in:
Deluan
2020-01-13 15:28:55 -05:00
committed by Deluan Quintão
parent d3af7e689d
commit c2448d3880
10 changed files with 134 additions and 34 deletions
+3 -1
View File
@@ -24,7 +24,9 @@ func NewArtistRepository() domain.ArtistRepository {
func (r *artistRepository) Put(a *domain.Artist) error {
ta := Artist(*a)
return r.put(a.ID, &ta)
return WithTx(func(o orm.Ormer) error {
return r.put(o, a.ID, &ta)
})
}
func (r *artistRepository) Get(id string) (*domain.Artist, error) {