Run SQL tests in memory

This commit is contained in:
Deluan
2020-01-13 09:06:11 -05:00
committed by Deluan Quintão
parent 87ca885b5e
commit 4b08df0725
6 changed files with 20 additions and 16 deletions
+5
View File
@@ -103,6 +103,11 @@ func difference(slice1 []string, slice2 []string) []string {
return diffStr
}
func (r *sqlRepository) DeleteAll() error {
_, err := r.newQuery(Db()).Filter("id__isnull", false).Delete()
return err
}
func (r *sqlRepository) purgeInactive(activeList interface{}, getId func(item interface{}) string) ([]string, error) {
allIds, err := r.GetAllIds()
if err != nil {