2024-08-09 19:14:28 +00:00
|
|
|
package builder
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"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 convertConflict(ctx Dialect, fields ...string) string {
|
2024-08-09 19:14:28 +00:00
|
|
|
keys := utils.Map(fields, ctx.GetColumnName)
|
2024-08-09 22:33:10 +00:00
|
|
|
return fmt.Sprintf("ON CONFLICT (%s)", strings.Join(keys, ","))
|
2024-08-09 19:14:28 +00:00
|
|
|
}
|