Add a limit for the record count in the DataSet
Add a parameter, for example, MaxFetchRows, which will limit the number of records which can be fetched to the DataSet.
-
Anonymous commented
if you use group in same dbgrid (devexpress) is necessary to use maxfetchrows, is good idea
-
Dorin Marcoci commented
you can limit rows simply by SQL statement like:
select bla bla from table rows 1000 -
Carlton commented
My suggestion for this feature is that it would limit the total number of rows that would be retrieved. A value of -1 would mean all rows. But say a value of 10000 when there are 5M rows would retireve only a max of 10000. And that 10000 would hopefully be something that the server understands, as it would be much more efficient to do a "select * from items" and have the server prepare a resultset of just 10000 rows vs. having it prepare a resultset of 5M and then have a Uni component limit that to the 10000. I know that there will be cases in which a server might not support this, in which case Uni should emulate. This approach is similar to a feature in AnyDAC and I think it is quite useful.
-
AdminDevart (_, Devart) commented
Our DataSets already have the FetchRows property which provides this functionality (If FetchRows = 1000, Next will retrieve additional 1000 records when 1000th record is reached). Also you can use FetchRows=1000 and UniDirectional=True if you want keep in the memory last 1000 record only. Please tell us if you mean some other functionality for “max count”. MaxFetchRows should set the absolute limit.
-
Keith Russell commented
This should also allow the client to execute a next to retrieve the subsequent number of records restricted by the max count. So max count = 1000 execute retrieves an additional 1000 etc