ReactionRepository

Repository to read and write reactions.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun clear()

Clear reactions of this repository.

Link copied to clipboard
abstract suspend fun deleteReaction(reaction: Reaction)

Deletes a reaction.

Link copied to clipboard
abstract suspend fun insertReaction(reaction: Reaction)

Inserts a reaction.

Link copied to clipboard
abstract suspend fun selectReactionById(id: Int): Reaction?

Selects reaction with specified id.

Link copied to clipboard
abstract suspend fun selectReactionIdsBySyncStatus(syncStatus: SyncStatus): List<Int>

Selects all reaction ids with specific SyncStatus.

Link copied to clipboard
abstract suspend fun selectReactionsByIds(ids: List<Int>): List<Reaction>

Selects all reactions with specified ids

Link copied to clipboard
abstract suspend fun selectReactionsBySyncStatus(syncStatus: SyncStatus): List<Reaction>

Selects all reactions with specific SyncStatus

Link copied to clipboard
abstract suspend fun selectUserReactionsToMessage(messageId: String, userId: String): List<Reaction>

Selects all current user reactions of a message.

Link copied to clipboard
abstract suspend fun selectUserReactionToMessage(reactionType: String, messageId: String, userId: String): Reaction?

Selects the reaction of given type to the message if exists.

Link copied to clipboard
abstract suspend fun updateReactionsForMessageByDeletedDate(userId: String, messageId: String, deletedAt: Date)

Updates the Reaction.deletedAt for reactions of a message.