changed types.JsonArray to support generics

This commit is contained in:
Gani Georgiev
2023-03-22 17:12:44 +02:00
parent a79f3a7c56
commit 923fc26a31
13 changed files with 69 additions and 65 deletions

View File

@@ -247,9 +247,9 @@ func (dao *Dao) IsRecordValueUnique(
var normalizedVal any
switch val := value.(type) {
case []string:
normalizedVal = append(types.JsonArray{}, list.ToInterfaceSlice(val)...)
normalizedVal = append(types.JsonArray[string]{}, val...)
case []any:
normalizedVal = append(types.JsonArray{}, val...)
normalizedVal = append(types.JsonArray[any]{}, val...)
default:
normalizedVal = val
}