> On Jun 28, 2015, at 5:29 PM, Brendan Duddridge <[email protected]> wrote:
> 
> Is there a CBL for iOS equivalent to doing an SQL INTERSECTION or UNION?
> Or do I basically have to load in two sets of results and use NSSet or 
> something like that to get an intersection or union?

No, there isn’t any support for combining the results of multiple queries. 
You’ll need to merge them yourself. Often you can do it without having to dump 
everything into an NSSet; since each enumerator will traverse the keys in 
increasing order, you can often just do pairwise comparison of keys while 
enumerating both queries in parallel.

Another option is to define another view that will generate the results you 
want, for example emitting two properties of a document to do an effective 
UNION of views that emit one of the properties.

—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/DB9DB3F1-2C58-47B6-9976-8615B62ADC16%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to