Hi, On 8/17/07, Christoph Kiehl <[EMAIL PROTECTED]> wrote: > Thomas Mueller wrote: > > 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 ...
I don't like the -1 result. As long as it's allowed, an interoperable client must always assume that an implementation may return -1 and provide a workaround for such cases. How is the total size question typically solved in cases where an application pages through a large database result set? I recall sometimes using a separate COUNT(*) query for that, but there may be more efficient alternatives. BR, Jukka Zitting
