dal/pkg/builder/convert_conflict.go

14 lines
259 B
Go
Raw Normal View History

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