Get All Channel name in Couchbase Lite

how to make a LiveQuery over channels ?

You can’t use live queries to query documents part of the same channel because the channel mappings live on the (Sync Gateway + Couchbase Server) only.

A possible workaround would be to:

  1. Use a filtered pulled replication based on a channel
  2. Use the database change listener or replication listener to get notified of new docs being pulled


thanks for reply , sorry for bad question, how to LiveQuery for get all channel names(just channel names)

Channel names are never synchronized to the Couchbase Lite database. This information is used by Sync Gateway only to know which user has access to what documents. However, when you create a session and subsequently get info on the session, the response contains the channels that the logged in user has access to. You could then store those channel names in a local document (which won’t get replicated).


thanks man for your help