Started the implementation of getMusicDirectory. Probably will need to introduce a new 'service' layer...
This commit is contained in:
@@ -39,6 +39,11 @@ func (r *baseRepository) CountAll() (int, error) {
|
||||
return len(ids), err
|
||||
}
|
||||
|
||||
func (r *baseRepository) Exists(id string) (bool, error) {
|
||||
res, err := db().SIsMember([]byte(r.table + "s:all"), []byte(id))
|
||||
return res != 0, err
|
||||
}
|
||||
|
||||
func (r *baseRepository) saveOrUpdate(id string, entity interface{}) error {
|
||||
recordPrefix := fmt.Sprintf("%s:%s:", r.table, id)
|
||||
allKey := r.table + "s:all"
|
||||
|
||||
Reference in New Issue
Block a user