Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun clear()

Clear users of this repository.

Link copied to clipboard
open suspend override fun deleteChannel(cid: String)

Deletes a Channel by the cid.

Link copied to clipboard
open suspend override fun deleteChannelMessage(message: Message)

Deletes a Message from a Channel.messages.

Link copied to clipboard
open suspend override fun deleteChannelMessagesBefore(cid: String, hideMessagesBefore: Date)

Deletes channel messages before hideMessagesBefore and removes channel from the cache.

Link copied to clipboard
Link copied to clipboard
open suspend override fun insertChannel(channel: Channel)

Inserts a Channel

Link copied to clipboard
open suspend override fun insertChannels(channels: Collection<Channel>)

Inserts many Channels.

Link copied to clipboard
open suspend override fun insertMessage(message: Message)

Inserts a messages.

Link copied to clipboard
open suspend override fun insertMessages(messages: List<Message>)

Inserts many messages.

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

Inserts a reaction.

Link copied to clipboard
open suspend override fun insertThreads(threads: List<Thread>)

Inserts the given list of Thread.

Link copied to clipboard
suspend fun markMessageAsDeleted(message: Message)
Link copied to clipboard
open suspend override fun selectChannels(channelCIDs: List<String>): List<Channel>

Select channels by full channel IDs Channel.cid

suspend fun selectChannels(channelIds: List<String>, pagination: AnyChannelPaginationRequest?): List<Channel>
Link copied to clipboard
open suspend override fun setHiddenForChannel(cid: String, hidden: Boolean)
open suspend override fun setHiddenForChannel(cid: String, hidden: Boolean, hideMessagesBefore: Date)

Sets the Channel.hidden for a channel.

Link copied to clipboard
suspend fun storeStateForChannel(channel: Channel)
Link copied to clipboard
suspend fun storeStateForChannels(channels: Collection<Channel>)
Link copied to clipboard
open suspend override fun updateMembersForChannel(cid: String, members: List<Member>)

Updates the members of a Channel

Inherited functions

Link copied to clipboard
open suspend override fun cacheChannelConfigs()

Caches in memory data from DB.

Link copied to clipboard
open suspend override fun deleteChannelMessages(cid: String)

Deletes all messages from a channel.

Link copied to clipboard
open suspend override fun deleteChannelThreads(cid: String)

Deletes all threads from a channel.

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

Deletes a reaction.

Link copied to clipboard
open suspend override fun evictChannel(cid: String)

Evict a Channel from the repository.

Link copied to clipboard
open suspend override fun evictMessage(messageId: String)

Evicts a message from the repository.

Link copied to clipboard
open suspend override fun evictMessages()

Evict messages from the repository.

Link copied to clipboard
open suspend override fun insertChannelConfig(config: ChannelConfig)
Link copied to clipboard
open suspend override fun insertChannelConfigs(configs: Collection<ChannelConfig>)

Writes many ChannelConfig

Link copied to clipboard
open suspend override fun insertCurrentUser(user: User)

Inserts the current user of the SDK.

Link copied to clipboard
open suspend override fun insertQueryChannels(queryChannelsSpec: QueryChannelsSpec)

Inserts a query channels.

Link copied to clipboard
open suspend override fun insertSyncState(syncState: SyncState)

Inserts a sync state.

Link copied to clipboard
open suspend override fun insertThreadOrder(id: String, order: List<String>)

Inserts the order in which local threads should be displayed.

Link copied to clipboard
open suspend override fun insertUser(user: User)

Inserts a users.

Link copied to clipboard
open suspend override fun insertUsers(users: Collection<User>)

Insert many users.

Link copied to clipboard
open override fun observeLatestUsers(): StateFlow<Map<String, User>>

Returns flow of latest updated users.

Link copied to clipboard
open suspend override fun selectAllCids(): List<String>

Selects all channels' cids.

Link copied to clipboard
open suspend override fun selectBy(filter: FilterObject, querySort: QuerySorter<Channel>): QueryChannelsSpec?

Selects by a filter and query sort.

Link copied to clipboard
open suspend override fun selectChannel(cid: String): Channel?

Select channel by full channel ID Channel.cid

Link copied to clipboard
open suspend override fun selectChannelCidsBySyncNeeded(limit: Int): List<String>

Read which channel cids need sync.

Link copied to clipboard
open override fun selectChannelConfig(channelType: String): ChannelConfig?

Select the ChannelConfig for a channel type.

Link copied to clipboard
open suspend override fun selectChannelsSyncNeeded(limit: Int): List<Channel>

Read which channels need sync.

Link copied to clipboard
open suspend override fun selectMembersForChannel(cid: String): List<Member>

Reads the member list of a channel.

Link copied to clipboard
open suspend override fun selectMessage(messageId: String): Message?

Reads the message with passed ID.

Link copied to clipboard
open suspend override fun selectMessageBySyncState(syncStatus: SyncStatus): List<Message>

Selects all message of a SyncStatus

Link copied to clipboard
open suspend override fun selectMessageIdsBySyncState(syncStatus: SyncStatus): List<String>

Selects all message ids of a SyncStatus

Link copied to clipboard
open suspend override fun selectMessages(messageIds: List<String>): List<Message>

Selects messages by IDs.

Link copied to clipboard
open suspend override fun selectMessagesForChannel(cid: String, pagination: AnyChannelPaginationRequest?): List<Message>

Select messages for a channel in a desired page.

Link copied to clipboard
open suspend override fun selectMessagesForThread(messageId: String, limit: Int): List<Message>

Select messages for a thread in a desired page.

Link copied to clipboard
open suspend override fun selectMessagesWithPoll(pollId: String): List<Message>

Selects all messages with a poll with the passed ID.

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

Selects reaction with specified id.

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

Selects all reaction ids with specific SyncStatus.

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

Selects all reactions with specified ids

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

Selects all reactions with specific SyncStatus

Link copied to clipboard
open suspend override fun selectSyncState(userId: String): SyncState?

Selects a sync state.

Link copied to clipboard
open suspend override fun selectThread(id: String): Thread?

Retrieves the Thread identified by id.

Link copied to clipboard
open suspend override fun selectThreadOrder(id: String): List<String>

Retrieves the order in which local threads should be displayed.

Link copied to clipboard
open suspend override fun selectThreads(ids: List<String>): List<Thread>

Retrieves all Threads identified by the supplied ids.

Link copied to clipboard
open suspend override fun selectUser(userId: String): User?

Selects a user by id.

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

Selects all current user reactions of a message.

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

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

Link copied to clipboard
open suspend override fun selectUsers(ids: List<String>): List<User>
Link copied to clipboard
open suspend override fun setChannelDeletedAt(cid: String, deletedAt: Date)

Sets the Channel.deleteAt for a channel.

Link copied to clipboard
open suspend override fun updateChannelMessage(message: Message)

Updates a Message from a Channel.messages.

Link copied to clipboard
open suspend override fun updateLastMessageForChannel(cid: String, lastMessage: Message)

Updates the last message for a Channel

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

Updates the Reaction.deletedAt for reactions of a message.

Link copied to clipboard
open suspend override fun upsertMessageInThread(message: Message)

Upsert a Message in the corresponding thread (if such exists).

Link copied to clipboard
open suspend override fun upsertMessagesInThread(messages: List<Message>)

Upsert a list of Messages in the corresponding thread (if such exists).