func getList() -> CBLQuery{
let view = self.database.viewNamed("list")
let block: CBLMapBlock = { (doc: [NSObject: AnyObject]!, emit: CBLMapEmitBlock!) in
if(doc["type"] as NSString == "item"){
emit([doc["item_id"]!, doc["index"]! as Int], doc)
}
}
view.setMapBlock(block, reduceBlock: nil, version: "1")
var query = view.createQuery()
var parentId = self.document.documentID
query.startKey = [parentId, 0]
query.endKey = [parentId, 6]
return query
}
Thank You
On Oct 30, 2014, at 9:16 AM, Karel-Jan Van Haute <kare...@gmail.com> wrote:To test it I added 0 and 6 witch are the current minimum and maximum in my list.So the question is how I can do that without giving the maximum.