query some cause on android couchbaselabs

8 views
Skip to first unread message

peng liu

unread,
Sep 26, 2014, 3:35:15 AM9/26/14
to mobile-c...@googlegroups.com
i have use this framework on my android :
https://github.com/couchbaselabs/GrocerySync-Android
bu i do not know how to query my database (views).
such as in sql:select *from user where userName = 'wade' and sore > 75?
how to work it on couchbaselabs???

Jens Alfke

unread,
Sep 26, 2014, 11:40:16 AM9/26/14
to mobile-c...@googlegroups.com
On Sep 26, 2014, at 12:35 AM, peng liu <liup...@gmail.com> wrote:

i have use this framework on my android :
https://github.com/couchbaselabs/GrocerySync-Android

That's a demo application. The framework is https://github.com/couchbase/couchbase-lite-android

bu i do not know how to query my database (views).
such as in sql:select *from user where userName = 'wade' and sore > 75?

Have you read the View and Query documentation?

In your example you would create a map function that calls emit([doc.userName, doc.score], null), and the query would set the startKey to ["wade", 76] and endKey to ["wade", {}].

—Jens

Reply all
Reply to author
Forward
0 new messages