When we sync our local couchbase database in android with the server, what is exactly being synced? Do we have control over what can be synced and what not?
Right now I give the sync URl and Couchbase syncs the whole database (rather documents with appropriate channels to the android application). Is there any other way of controlling which data is synced?
Also are views created on the server synced to the mobile application as well? If not, is there a way to replicate the server view as well to the mobile app?
2
votes
1 Answers
0
votes
To answer your second question first, views are not replicated, as they're part of the app installed on the mobile device. This makes sense as the indexes you have for the set of data is really a function of how the app is going to use it. Also, views on Couchbase Mobile are typically implemented in the native language (Android, iOS, Xamarin C# or Unity).
Regarding sync, channels are the primary way to filter down what's going to be sync'd to a device. Since they can be added either declaratively or programmatically in a sync function, it's pretty flexible. What other way might you be seeking?