CBL 2.0 query resultset is looping


I’m using CBL 2.0 in my Xamarin application. I’m querying data with the “limit” option. It works as expected; the data is incrementally fetched to my ListView.

However, I noticed that when all the data is fetched, it starts over and returns the same first 10 rows again, instead of an empty resultset.

How can I correct this? I don’t want to fetch more rows if all the rows are present.

My queries looks like this:

            var query = QueryBuilder

            var rows = await Task.Run(() => query.Execute());

            return rows.Select(row => row.ToDictionary()).Select(ToObject).ToList();

Thanks in advance,

Nevermind, I had forgot to add the offset to the limit clause. My bad!

Loving CBL 2.0 so far; great job, team!

1 Like