Open tobinharris opened 11 years ago
I second that request. Temporarily pausing a CouchLiveQuery would be useful.
I think this can be achieved by setting database.trackChanges=NO. Although it will stop all other live queries, if any.
FYI, I'm unlikely to implement this myself, because my time is going into Couchbase Lite and the Sync Gateway. I do recognize that some people use CouchCocoa along with CBL to talk directly to remote databases, though. It shouldn't be hard for someone else to implement.
Discussed here on the TouchDB group.
I want my CouchLiveQuery to be paused when it's not the active screen in a navigation hierarchy, and then resume when the screen is loaded. This is to stop the query running and initiating re-indexing whilst the view is not visible. For my app, that re-indexing is a bit of a performance hit.
Jens suggested a simple solution - adding a .paused property to CouchLivequery that makes it ignore database changed notifications when .paused is set to YES.
T