> On Sep 1, 2014, at 7:21 PM, [email protected] wrote: > > view.SetMapReduce((IDictionary<string, object> document, > EmitDelegate emitter) => { > if (document["_id"] != null) { > emitter(document["_id"], document["_id"]); > > }
There's no reason to create a view like this — it's identical to the built-in all-documents view. Just call Database.createAllDocsQuery instead, if you want to iterate over all documents. (Also, as s.anderson pointed out, document["_id"] is never null, and it's redundant to emit it as the value since it's already the key.) —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/1D4B4FCA-A49D-4436-882B-51BAC6D38CD8%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
