When running queries that do joins, I often find the format of the result
somewhat cumbersome, with its nested structures representing the different
tables in the join. If I were writing the query in raw SQL, I would
probably use "AS" clauses to select just the columns that I want, with
simple "top-level" names. Something like
Select Table1.foo as stuff, Table2.bar as blah from Table1, Table2 ...
Is there a way to do this with Web2py? It would seem natural to specify
this inside the select call, something like
db(db.Table1.foo=db.Table2.foo).select(db.Table1.foo.alias('foo'),
db.Table2.bar.alias('blah'))
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.