On 2013-12-11 17:39, Tobias Bocanegra wrote:
yes it does. to limit the amount of returned entries. I assume the
'limit' parameter here is just a safeguard against OOME. otherwise a
(range)iterator would make more sense as return value.
if you want "pagination" you would also need an offset parameter.
regards, toby
Such as "fromKey"? :-)
On Wed, Dec 11, 2013 at 8:02 AM, Julian Reschke <[email protected]> wrote:
/**
* Get a list of documents where the key is greater than a start value
and
* less than an end value. The returned documents are immutable.
*
* @param <T> the document type
* @param collection the collection
* @param fromKey the start value (excluding)
* @param toKey the end value (excluding)
* @param indexedProperty the name of the indexed property (optional)
* @param startValue the minimum value of the indexed property
* @param limit the maximum number of entries to return
* @return the list (possibly empty)
*/
@Nonnull
<T extends Document> List<T> query(Collection<T> collection,
String fromKey,
String toKey,
String indexedProperty,
long startValue,
int limit);
Is some kind of ordering implied? (Otherwise, how does "limit" make sense?)
Best regards, Julian