setUserNotificationsAsSent

@Modifying(clearAutomatically = true)
@Query(value = "UPDATE " + NOTIFICATIONS_KEY + " SET " + IS_SENT_KEY + "='" + 1 + "' WHERE " + USER_KEY + "=:" + USER_KEY + " AND " + IS_SENT_KEY + "='" + 0 + "'", nativeQuery = true)
abstract fun setUserNotificationsAsSent(@Param(value = "user") userId: String)

Method to execute the query to set as sent all the notifications of a user

Parameters

userId

: the identifier of the user who the notifications belong