1

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?

Andrew Magee
  • 6,506
  • 4
  • 35
  • 58

1 Answers1

1

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.

Kyaw Tun
  • 12,447
  • 10
  • 56
  • 83
  • Kyaw, Is there any docs on just using db.open? When I do a search I don't see any basic usage examples. I saw some questions on SO about deleting records etc but none with simply pushing data out. I really just need to push data to the screen no sorting etc. Thanks! – proxim0 Sep 01 '14 at 14:05
  • Is the example in [open API doc](http://dev.yathit.com/api-reference/ydn-db/storage.html#open) not good enough? – Kyaw Tun Sep 01 '14 at 14:13