I was a bit confused about mapbloc... nice! I really say thank you! This is a nice point to start! Thank you again!
Il giorno venerdì 10 luglio 2015 19:18:43 UTC+2, Jens Alfke ha scritto: > > > On Jul 9, 2015, at 11:04 PM, Daniel Sonny Agliardi <[email protected] > <javascript:>> wrote: > > with this method i get in console all document, so how can i select only > documents of a kind and with said flag true? > > > The view you created will index every document that contains a property > named “workout”. Querying this view with no extra parameters, as you’re > doing, will return all of the documents that were indexed. > > I’m not exactly sure what you want to do, but if you only want to index > the documents where the “workout” property has a value of true, then change > the line in the map block to > if ([doc[@"workout”] isEqual: @YES]) > > Or if you still want to index all docs with the “workout” property, then > leave the map function alone but specify what key value you’re querying for: > query.startKey = query.endKey = @YES; > > In particularly i didn't found a lot of documentation on map block, is > there the place where i have to place the conditions? > > > > http://developer.couchbase.com/mobile/develop/guides/couchbase-lite/native-api/view/index.html#mapfunctions > > http://developer.couchbase.com/mobile/develop/guides/couchbase-lite/native-api/query/index.html > > —Jens > -- 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/499b1bd2-9235-410c-ae28-5913dac725ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
