I am trying to get all documents marked with the same ‘type’ field using a query as such:
CBLQueryBuilder *tagQueryBuilder = [[CBLQueryBuilder alloc]
initWithDatabase: self.cbDatabase
select: @[@"userID"]
where: @"type == 'user_details'
orderBy: nil
error: &error];
CBLQueryEnumerator* e = [tagQueryBuilder runQueryWithContext: nil error: &error];
if (e) {//stuff here...
} else {
[self cb_handleError:error];
}
Which works fine! However really I want to pull the whole document (which has about 20 variables) and I don’t really want to put every variable in the select field (and make sure it stays updated) when I could just pull the whole document. But maybe querying just the userID and and then loading each document separately is inefficient? What is the best way of doing this?
Thanks!