2024-08-09 19:14:28 +00:00
|
|
|
package builder
|
|
|
|
|
|
|
|
import (
|
2024-08-09 22:33:10 +00:00
|
|
|
"fmt"
|
2024-08-09 19:14:28 +00:00
|
|
|
"strings"
|
|
|
|
|
2024-08-29 19:10:29 +00:00
|
|
|
"l12.xyz/x/dal/pkg/utils"
|
2024-08-09 19:14:28 +00:00
|
|
|
)
|
|
|
|
|
2024-08-11 19:49:19 +00:00
|
|
|
func convertGroup(ctx Dialect, keys []string) string {
|
2024-08-09 19:14:28 +00:00
|
|
|
set := utils.Map(keys, ctx.GetColumnName)
|
2024-08-09 22:33:10 +00:00
|
|
|
return fmt.Sprintf("GROUP BY %s", strings.Join(set, ", "))
|
2024-08-09 19:14:28 +00:00
|
|
|
}
|