setUserNotificationsAsRed

@Modifying(clearAutomatically = true)
@Query(value = "DELETE FROM " + NOTIFICATIONS_KEY + " WHERE " + USER_KEY + "=:" + USER_KEY + " AND " + RELEASE_IDENTIFIER_KEY + "=:" + RELEASE_IDENTIFIER_KEY + " AND " + IS_SENT_KEY + "='" + 1 + "'", nativeQuery = true)
abstract fun setUserNotificationsAsRed(@Param(value = "user") userId: String, @Param(value = "release_id") releaseId: String)

Method to execute the query to set as red all the notifications of a user deleting the related records

Parameters

userId

: the identifier of the user who the notifications belong