2024-08-09 19:14:28 +00:00
|
|
|
package builder
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"strings"
|
|
|
|
|
2024-08-20 19:10:21 +00:00
|
|
|
"github.com/nesterow/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
|
|
|
}
|