Fix some performance/volume issues

This commit is contained in:
Deluan
2020-01-13 00:04:11 -05:00
committed by Deluan Quintão
parent 973f8869eb
commit fddd0dc353
9 changed files with 94 additions and 45 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ type artistIndexRepository struct {
func NewArtistIndexRepository() domain.ArtistIndexRepository {
r := &artistIndexRepository{}
r.entityName = "artist_info"
r.tableName = "artist_info"
return r
}
@@ -106,7 +106,7 @@ func (r *artistIndexRepository) GetAll() (domain.ArtistIndexes, error) {
}
func (r *artistIndexRepository) DeleteAll() error {
_, err := r.newQuery(Db()).Exclude("idx", ".PHONY").Delete()
_, err := Db().Raw("delete from artist_info").Exec()
return err
}