dal/pkg/builder/convert_conflict.go
2024-08-20 19:34:01 +02:00

14 lines
241 B
Go

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