Closed bradley-holt closed 6 years ago
would it be useful to include some sort of count
or size
to the Shopping List which indicates the number of items in the shopping list?
@vabarbosa Good suggestion! I'm inclined to do this using a _count
reduce function (which I can add to the README), rather than including it as metadata within a shopping list. This way the shopping list document does not need to be updated every time that a shopping list item is added or removed from the shopping list. What are your thoughts on that?
@bradley-holt works for me. i started thinking the same shortly after i submitted the comment.
I've made several changes to the data model to account for only using Mango and not map/reduce for queries. The reason for this is that Cloudant Sync does not support map/reduce and also that it is best to avoid map/reduce in PouchDB. The least common denominator here is Mango.
Specific changes include:
I've made a few more changes to the data model:
An interoperable data model has been outlined here: https://github.com/ibm-watson-data-lab/shopping-list#interoperability
Please provide feedback on this design as comments on this ticket.