Select Offset and limit not working

24 views
Skip to first unread message

Yasir Shaikh

unread,
Dec 2, 2015, 11:36:04 PM12/2/15
to Dexie.js
Hi 

I am fetching records from local DB using Dexie jd . so now I am fetching limited records using offset and limit but 
it not working ,kindly give me actual query 

thanks

David Fahlander

unread,
Dec 3, 2015, 5:40:51 AM12/3/15
to dex...@googlegroups.com
Could it be missing out the .toArray() method? The sample for offset/limit may not have been verbose enough. Just updated it at: https://github.com/dfahlander/Dexie.js/wiki/Table.offset()#sample

Here's a simpler example:

db.users.where("firstName").startsWithIgnoreCase('a').offset(50).limit(25).toArray()

   
.then(function (results) {
        alert
(JSON.stringify(results, null, 4));
   
});




Yasir Shaikh

unread,
Dec 8, 2015, 2:33:10 AM12/8/15
to Dexie.js
Dear David,

Thanks a lot , It is Working good .
Reply all
Reply to author
Forward
0 new messages