QueryChannelsSpec

data class QueryChannelsSpec(val filter: FilterObject, val querySort: QuerySorter<Channel>, var cids: Set<String> = emptySet(), val predefinedFilterName: String? = null, val predefinedFilterValues: Map<String, Any>? = null, val predefinedSortValues: Map<String, Any>? = null, val groupKey: String? = null)

Spec describing a query channels operation and the channel CIDs that belong to it.

Three identity flavors are supported:

  • Standard queries: identity is (filter, querySort).

  • Predefined queries: identity is predefinedFilterName plus the interpolation value maps. The filter and querySort held by this spec instance are the currently resolved values for that predefined query (captured by replacing the held spec instance — see QueryChannelsMutableState.applyResolvedSpec).

  • Grouped queries: identity is groupKey, the stable key returned by the server's grouped channels endpoint. filter and querySort hold neutral placeholders for these queries.

The 2-arg constructor and 2-arg copy are kept for binary compatibility with callers that predate the predefined-filter fields. They delegate to the primary constructor with the predefined fields defaulted to their empty/null values.

Constructors

Link copied to clipboard
constructor(filter: FilterObject, querySort: QuerySorter<Channel>, cids: Set<String> = emptySet(), predefinedFilterName: String? = null, predefinedFilterValues: Map<String, Any>? = null, predefinedSortValues: Map<String, Any>? = null, groupKey: String? = null)
constructor(filter: FilterObject, querySort: QuerySorter<Channel>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(filter: FilterObject = this.filter, querySort: QuerySorter<Channel> = this.querySort): QueryChannelsSpec