I\'m using the excellent YDN-DB as part of a complicated \'dashboard\' web page that allows a user to download a large amount of information and then search & filter the
From what I can see from you code, column 'd' should be INTEGER, or query should use date like:
ydn.db.KeyRange.bound(toDate(1389571200000),toDate(1390435200000), false, false)
EDIT:
Sorry, key joining algorithm only work for equi-join. Range will not work. You can use one range query however, but require six compound index [a, d], [b, d], [c, d], d, [e, d], [f, d] and join using ZigZeg merge. Detail here http://dev.yathit.com/ydn-db/nosql-query.html You can also find requirement for equi join.
Current ZigZeg is faster then SortedMerge since IndexedDB API spec 1 does not have require methods. However v2 is coming with require methods, namely openKeyCursor
and continuePrimaryKey
. Result of ZigZeg is sorted by d, whereas SortedMerge is sorted by primary key.
Instead of storing a Date
object, store the timestamp representation instead:
var timestamp = new Date().getTime();
Since a timestamp is an integer, you can then effectively use a key range on it.