feat: make SCIM work with MySQL

GitOrigin-RevId: a833fe21172d9c218b55d7229e4ed3a131cfcb6c
This commit is contained in:
Philippe Gaultier 2025-11-14 14:43:50 +01:00 committed by ory-bot
parent a3418677d8
commit 10ec9bf3e5
1 changed files with 8 additions and 0 deletions

View File

@ -100,3 +100,11 @@ func NamedUpdateArguments(t any, exclude ...string) string {
return strings.Join(statements, ", ")
}
func OnConflictDoNothing(dialect string, columnNoop string) string {
if dialect == "mysql" {
return fmt.Sprintf(" ON DUPLICATE KEY UPDATE `%s` = `%s` ", columnNoop, columnNoop)
} else {
return ` ON CONFLICT DO NOTHING `
}
}