YDN-DB - Incorrect results using mixed data types with SortedMerge

前端 未结 2 1106
闹比i
闹比i 2020-12-07 05:30

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

2条回答
  •  攒了一身酷
    2020-12-07 06:21

    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.

提交回复
热议问题