a .select() returns a Rows() object. 
iterating through that set of data to fetch what you need - if you need it 
- it's the only way.

If you need only the id, you'd be better off doing
rows = db(db.table).select(db.table.id, cacheable=True)

and then iterating the reduced set because:
- only one column is fetched back and parsed into Rows
- the cacheable attribute strips off the facilities of auto-references, 
update_record and delete_record, etc

More advanced "extraction" techniques involve passing a processor function 
to the parse the resultset of the select, but at that point you may as well 
leverage a raw select on the underlying adapter.

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to