On Aug 11, 2010, at 5:14 PM, Rob wrote: > Where is this syntax documented? > > db(query1)(query2) > > Is this the same as 'db(query1 & query2)' except web2py does the join > and not the database?
It's identical. db(query) returns a Set instance. And calling a Set instance that already has a query combines the queries with &: def __call__(self, query): if self._query: return Set(self._db, self._query & query) else: return Set(self._db, query) (this is from dal.py; sql.py isn't quite so readable) As for documentation, I think that all these DAL behaviors ought to be better documented. Maybe the next rev of the book....