jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kiehl <christ...@sulu3000.de>
Subject Re: Total size of a query result and setLimit()
Date Fri, 17 Aug 2007 16:43:18 GMT
Thomas Mueller wrote:

>> I'm not concerned about an implementation not being able to 'support'
>> setLimit(). I rather think of applications using that new method and at the same
>> time wish to find out the total number of matches, as written initially by
>> Christoph.
> 
> I understand.
> 
>> keep the setLimit() as is. but introduce a getSize() (or getTotalMatches()?) on
>> the QueryResult. This method always returns the total number of nodes/rows
>> independent of setLimit().
> 
> That's a good idea! Implementations that can't support it efficiently
> could then calculate the size only when required. What about
> getTotalSize()?

Implementations should maybe even allowed to return -1 (as on 
RangeIterator.getSize()) if they do not support this method ...

Cheers,
Christoph


Mime
View raw message