On Mar 10, 2011, at 6:22 AM, Jacek Kałucki wrote:
> Although Dabo cursor has support for limiting fetching result set
> with the SQL limit clause, thing that is missing is fetching remaining
> data from the set.
> What do you think about using the fetchmany instead of limit?
> It should be easier to retrieve batch results since this method is SQL
> independent,
> versus different limit/offset handling in by various backends.
> We could also extend requery with the scope parameter like next/rest/all.
The two work on different things. 'Limit' limits the amount of data
returned by the database; 'fetchmany' is used by the local dbapi cursor *after*
the data is returned from the database to iterate through the returned records
a few at a time. The fetch* methods don't affect the amount of data returned
from the database; they are completely local.
What it seems you are thinking of is the offset part of the limit
clause, which is typically used in getting "pages" of data at a time. Right now
our db layer doesn't support all the different syntaxes, but if you enter:
biz.setLimit("100 offset 200"), you'll get 100 rows back starting with the
200th row.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]