On Thursday, March 10, 2011 05:11:34 am Ed Leafe wrote:
> 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

Years ago Ed suggested that opening a blank CRUD form and then requiring the 
user to provide a filter first and then retrieve the data using the filter 
would be enough to over come the need to retrieve all records (this basic 
issue).  In general Ed has been right. 

However, I do see the need of having a grid control retrieve a limited number 
of records for the display and then retrieve the rest as needed.  Just 
yesterday a client asked for way to display his entire inventory by retrieving 
all records from a blank/empty filter.  With 1000's of inventory items I could 
see the grid being unresponsive.  

That said, I also see many issues raising their ugly heads if the grid had 
some means of retrieving only a limited number of records for the purposes of 
display and only retrieving the rest as required.  I.e. column sorting 
routines would be very difficult.

Johnf

_______________________________________________
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]

Reply via email to