I want Pagination of Results, like my total objects are 100, i want pagination like 100-80, 80-60… 20-0
For this i had used CBLQuery as like below code.
let query = CBLQueryBuilder(database: Constants.appDeleRef.database, select: nil, wherePredicate: predicate, orderBy: orderlist, error: nil)
let queryObj : CBLQuery = query.createQueryWithContext(nil)
queryObj.descending = true
queryObj.startKey = 10
queryObj.limit = 10
let result : CBLQueryEnumerator = try! queryObj.run()
But i’m getting 0 result from above query. Does anything wrong with Query.