We only provide these two files 12 that extract a mysql or pgsql table and write a dal model. It is not as good as sqlalchemy because we have not been much concerned with legacy tables. We will improve this anyhow.
web2py handles joins a relations to the extend the underlying database does. Suppose you have
where dog.owner is a reference to a person. You can do a INNER JOIN
for row in db(Person.id==Dog.owner).select(): print row.person.name, row.dog.name
a LEFT OUTER JOIN
for row in db().select(Person.ALL,Dog.ALL,left=Dog.on(Person.id==Dog.owner)): print row.person.name, row.dog.name
or you can fetch a dog and find his owner
print Dog(name="Skipper").owner.name
or you can fetch a person and find his dogs
for dog in Person(name="John").dog.select(): print dog.name
I am not sure what you are talking about session capability. Web2py had session support since the first public version in Oct 2007 and we never changed it.
It's just a suggestion. Someone like me who's just browsing to see what kind of features it offers will look at the list provided and come to the conclusion (as I did) that those features aren't offered.
2
u/mdipierro Dec 10 '10
We only provide these two files 12 that extract a mysql or pgsql table and write a dal model. It is not as good as sqlalchemy because we have not been much concerned with legacy tables. We will improve this anyhow.
web2py handles joins a relations to the extend the underlying database does. Suppose you have
where dog.owner is a reference to a person. You can do a INNER JOIN
a LEFT OUTER JOIN
or you can fetch a dog and find his owner
or you can fetch a person and find his dogs
I am not sure what you are talking about session capability. Web2py had session support since the first public version in Oct 2007 and we never changed it.