Hi!

I am using CBL in my Phonegap application. I am creating native views 
(Android and iOS).
*View v1 = db.getView(String.format("%s/%s",*
* strDbName,*
*                        "getrecords_typewise"));*
* v1.setMap(new Mapper() *
* {*
* @Override*
* public void map(Map<String, Object> document, Emitter emitter) *
* {*
* Object docType = document.get("type");*
* if (docType != null && *
* document.get("is_active") != null *
* && document.get("is_active").equals(true))*
* {*
*             emitter.emit(docType.toString(), document);*
*                }*
* }*
* }, strVersion);*
* db.registerView(v1);*

Then I am querying views from JavaScript like this :
 *config.views(["getrecords_typewise", {*

* startkey : "contact",*

*        endkey : "contact",*

* descending : true*

*    }], function(err, view)*
*    {*
*    var len = view['rows'].length;*

*});*


I want to use live queries and on dbChange, I will update my associated UI 
list. How can I do this?

-- 
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/328dc918-c529-4717-b41c-59c825529358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to