This commit is contained in:
Deluan
2016-03-03 00:46:23 -05:00
parent ffd6304a23
commit 012958cd08
14 changed files with 63 additions and 63 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ func (r *baseRepository) CountAll() (int, error) {
}
func (r *baseRepository) Exists(id string) (bool, error) {
res, err := db().SIsMember([]byte(r.table + "s:all"), []byte(id))
res, err := db().SIsMember([]byte(r.table+"s:all"), []byte(id))
return res != 0, err
}
@@ -132,7 +132,7 @@ func (r *baseRepository) loadAll(entities interface{}, sortBy string, alpha bool
return r.loadFromSet(setName, entities, sortBy, alpha)
}
func (r* baseRepository) loadChildren(parentTable string, parentId string, entities interface{}, sortBy string, alpha bool) error {
func (r *baseRepository) loadChildren(parentTable string, parentId string, entities interface{}, sortBy string, alpha bool) error {
setName := fmt.Sprintf("%s:%s:%ss", parentTable, parentId, r.table)
return r.loadFromSet(setName, entities, sortBy, alpha)
}
@@ -161,4 +161,4 @@ func (r *baseRepository) loadFromSet(setName string, entities interface{}, sortB
return nil
}
}