简体   繁体   中英

How to query without limiting the number of results returned?

It seems by default any query will only return up to 100 values.

ie:

db.values("mystore").done(function(myvalues) {
    // myvalues.length <= 100, regardless of how many items are in `mystore`
});

The docs refer to the API being values(store_name, key_range, limit, offset, reverse) , but apparently null is not a valid limit. Also 0 and -1 just give me no results (or strangely, one result). How can I specify "unlimited results" without doing something silly like making the limit 999999 ?

Yes, unlimited result is not possible and its use is discouraged. Because your app will crash at some point.

If you want unlimitted result, use streaming api such as open or scan .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM