dal/pkg/builder/convert_conflict.go
2024-08-29 21:10:29 +02:00

14 lines
249 B
Go

package builder
import (
"fmt"
"strings"
"l12.xyz/x/dal/pkg/utils"
)
func convertConflict(ctx Dialect, fields ...string) string {
keys := utils.Map(fields, ctx.GetColumnName)
return fmt.Sprintf("ON CONFLICT (%s)", strings.Join(keys, ","))
}