Fix distinct() with GROUP BY clauses

This commit is contained in:
Tobie Morgan Hitchcock 2018-05-31 14:18:40 +01:00
parent ddefed03e6
commit 7277e32d88

View file

@ -48,7 +48,14 @@ func distinct(ctx context.Context, args ...interface{}) ([]interface{}, error) {
for _, x := range args {
a, _ := ensureSlice(x)
for _, v := range a {
c[v] = true
switch v := v.(type) {
case []interface{}:
for _, v := range v {
c[v] = true
}
default:
c[v] = true
}
}
}