我正在使用 Dexie
var db = new Dexie('name');
db.version(4)
.stores({
sentence: "&sentenceId, [sentence__authorId+sentenceChapter+sentenceNo], sentenceContent, headingContent, sentenceStarts, sentenceEnds"
)};
我需要得到按 sentenceNo 排序的结果
db.sentence.where('[sentence_authorId+sentenceChapter+sentenceNo]')
.between([articleId, chapter_selected.toString(), -Infinity], [articleId, chapter_selected.toString(), '\uffff'])
.each (function (sentence) {
//............
});
但我从上述查询中得到的结果就像以字符串格式对整数列进行排序
例如:1,11,12,13,14...
如何对整数中的句子编号进行排序
例如:1,2,3,4,...