Fix distinct() with GROUP BY clauses
This commit is contained in:
parent
ddefed03e6
commit
7277e32d88
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue