Open ecton opened 2 years ago
We should be able to reduce a view, grouping by the keys, and retrieve a list of documents that contributed to that reduced value.
After today's refactoring (af62a03e9582b46376879415ffc4b00358733b04), I'm pretty sure we can add two new ways to query views:
reduce_grouped_with_docs() -> MappedDocuments<OwnedDocument, V>
reduce_grouped_with_collection_docs() -> MappedDocuments<CollectionDocument<V::Collection>, V>
We should add examples to the Collection docs, the view-examples example, and if #168 is completed, add an example there too.
Collection
view-examples
Suggested by @colelawrence in Discord
We should be able to reduce a view, grouping by the keys, and retrieve a list of documents that contributed to that reduced value.
After today's refactoring (af62a03e9582b46376879415ffc4b00358733b04), I'm pretty sure we can add two new ways to query views:
reduce_grouped_with_docs() -> MappedDocuments<OwnedDocument, V>
reduce_grouped_with_collection_docs() -> MappedDocuments<CollectionDocument<V::Collection>, V>
We should add examples to the
Collection
docs, theview-examples
example, and if #168 is completed, add an example there too.Suggested by @colelawrence in Discord