changeMemberRole

@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + MEMBERS_KEY + " SET " + TEAM_ROLE_KEY + "=" + ":#{#" + TEAM_ROLE_KEY + ".name()}" + " WHERE " + OWNER_KEY + "=:" + OWNER_KEY + " AND " + TEAM_IDENTIFIER_KEY + "=:" + TEAM_IDENTIFIER_KEY", nativeQuery = true)
abstract fun changeMemberRole(@Param(value = "owner") member: String, @Param(value = "team_id") teamId: String, @Param(value = "team_role") role: Team.RefyTeamMember.TeamRole)

Method to execute the query to change a role of a member

Parameters

teamId

: the identifier of the team

member

: the member to change the role

role

: the role of the member to set