Oh I see. Sorry. My misunderstanding. I need to be able to create a channel for every database document, so I was thinking that would be done on the client side. It's the client who creates the database on their local device (with a unique identifier - e.g. db-12abc987def2340cdg) and then I was thinking that channels would be the way to separate the data for one database from another. A user can have as many databases as they like on their devices and they would sync only the documents from the channels they have access to.
Rather than all their data in a single database, they can spread it out across multiple client side databases. I'm just trying to figure out how to setup sync for that architecture with Sync Gateway and Couchbase Server. Thanks, Brendan On Thursday, November 5, 2015 at 1:56:09 PM UTC-7, Jens Alfke wrote: > > > On Nov 5, 2015, at 11:42 AM, Brendan Duddridge <[email protected] > <javascript:>> wrote: > > There seems to be a channels property on CBLReplication used for > filtering, but not on CBLDocument or CBLModel. > > > Channels are really only a server-side concept. The replicator sends that > channel list to the server via the _changes feed, and the filtering is done > on the server. The channel assignments of documents are not downloaded by > the replicator, so there’s nothing for local code to filter on. > > Is "channels" a keyword then for an NSArray property that I would add to > my CBLModel subclass in order to facilitate assigning documents to channels? > > > Document/channel assignments are done by the JavaScript “sync function” in > Sync Gateway. The channels are used for access control and routing to > clients. > > —Jens > -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/a705c05c-c6e4-4fb5-9224-a674581a2377%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
