couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Woodhead <>
Subject Conditional joins
Date Fri, 17 Sep 2010 13:04:03 GMT
Hi folks,

I'm pretty green with views and have a need to do a join with results
from one side returned if a condition is met on the other. In SQL I'd

select * from child join parent on where parent.status=1;

I've read the 'join' documentation (e.g. and can return
documents of multiple types with matching keys ok. What I can't do is
do the same but only if the parent matches a condition.

Specifically, my data is like:


I want to be be able to query a view by domain and see all users for
it if the status is 1. So in this case I'd see users for but
not for
Any help would be appreciated.

***** Email confidentiality notice *****

This message is private and confidential. If you have received this message in error, please
notify us and remove it from your system.

Simwood eSMS Limited is a limited company registered in England and Wales. Registered number:
03379831. Registered office: c/o HW Chartered Accountants, Keepers Lane, The Wergs, Wolverhampton,
WV6 8UA. Trading address: Falcon Drive, Cardiff Bay, Cardiff, CF10 4RU.

View raw message