-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
#97 introduced the decodeDocuments helper function, and adds comments that elude to the fact that when querying documents from CouchDB, you must set the include_docs parameter to true for Couch to include the documents themselves in the response. However, the existing queryByView function does not document this requirement, and so it could be confusing that something like this does not work:
database.queryByView("fruitView", ofDesign: "fruitDesign", usingParameters: []) {
(documents, error) in
let fruitDocs = documents?.decodeDocuments(ofType: Fruit.self)
....
}The solution in this case is to add usingParameters: [.includeDocs(true)]. I feel this use-case should be discussed in the documentation for the queryByView function.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels