Refactored PurgeInactive as a "generic" function.
Also delete indexes when removing records
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ type AlbumRepository interface {
|
||||
Get(id string) (*Album, error)
|
||||
FindByArtist(artistId string) (*Albums, error)
|
||||
GetAll(QueryOptions) (*Albums, error)
|
||||
PurgeInactive(active *Albums) error
|
||||
PurgeInactive(active Albums) error
|
||||
GetAllIds() (*[]string, error)
|
||||
GetStarred(QueryOptions) (*Albums, error)
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ type ArtistRepository interface {
|
||||
Put(m *Artist) error
|
||||
Get(id string) (*Artist, error)
|
||||
GetByName(name string) (*Artist, error)
|
||||
PurgeInactive(active *Artists) error
|
||||
PurgeInactive(active Artists) error
|
||||
}
|
||||
|
||||
type Artists []Artist
|
||||
|
||||
+1
-1
@@ -48,5 +48,5 @@ type MediaFileRepository interface {
|
||||
Put(m *MediaFile) error
|
||||
Get(id string) (*MediaFile, error)
|
||||
FindByAlbum(albumId string) (*MediaFiles, error)
|
||||
PurgeInactive(active *MediaFiles) error
|
||||
PurgeInactive(active MediaFiles) error
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ type PlaylistRepository interface {
|
||||
Put(m *Playlist) error
|
||||
Get(id string) (*Playlist, error)
|
||||
GetAll(options QueryOptions) (*Playlists, error)
|
||||
PurgeInactive(active *Playlists) error
|
||||
PurgeInactive(active Playlists) error
|
||||
}
|
||||
|
||||
type Playlists []Playlist
|
||||
|
||||
Reference in New Issue
Block a user