Set with all rows for web2py / pydal

102 Views Asked by At

In web2py I can do the following:

rows = db().select(person.ALL)

Which gives me all rows in the database person.

I can also do:

myset = db(person.name == 'Jim')

Which gives me a set of all people named Jim.

How can I get a set of all people?

1

There are 1 best solutions below

1
On BEST ANSWER

For a Set object defining all the records in the table, you can do:

db(db.person)

which is equivalent to:

db(db.person.id > 0)