The first one is linked from Couchbase Lite “Java SDK API References” but it omits classes like LiveQuery that are found in the second link. There is a lot of overlap between the two and also a lot of differences. Which one is correct? I’m developing a React Native Android app using Couchbase 2.0
The second link refers to a developer build (before 2.0 GA). The first link is the one to use. Can you point me to where you found the second link? I will update that page.
The second link was the second result from Googling “couchbase livequery”, sorry.
Is there documentation for LiveQuery? It’s used by AbstractDatabase so I’m assuming it’s still relevant.
Indeed, Live Query isn’t in the 2.0 API refs but is there in 2.0 DB20. I’ve filed a ticket to get that fixed. Please use the 2.0 DB20 page in the mean time. Sorry for the inconvenience.
Actually there is no more livequery class. It was merged into normal query post db20. The getting started docs should note that adding a change listener to a query makes it “live”
LiveQuery is under the 2.0.2 tag (and also the 2.0.x branch), e.g., https://github.com/couchbase/couchbase-lite-android/blob/2.0.2/shared/src/main/java/com/couchbase/lite/LiveQuery.java - should we avoid using it?
LiveQuery class doesn’t get declared as a public class so it’s a private API and shouldn’t be used directly by the application. To use LiveQuery functionality, you can just add a change listener to the Query object.