How to get last 10 docs from view?


#1

I am using CBL for android for chat app i want to show last 10 docs (chat messages) how can do it?
i know about skip and limit but there are giving first 10 messages.


#2

Use the “descending” option.


#3

@jens Thanks for reply… if i use descending its giving last 10 docs but last msg(doc) showing in first position of listview i need it to in last position … can i sort enumerator object


#4

You can get all the rows as an array and then reverse the array.