Open deathmaster9 opened 5 years ago
Hi @deathmaster9 thanks for your post.
I've considered CollectionGroup queries before, but I couldn't think of a good use case.
The basic philosophy of vuex-easy-firestore is (1 module == 1 firestore path).
So I'm not sure how to fit CollectionGroup queries in there. 😄
Can you explain more about your specific use case?
After about two years of open source, I finally got accepted for Github Sponsors!
A little about me:
BTW, donations get's paid DOUBLE by GitHub! (they're alchemists... 🦾)
Going forward 👨🏼💻
While this isn't a priority, I could see how it would happen. There would be an action on a collection to run a collection group queries. When the results come in, we'd have to create the doc submodule, the subcollection subsubmodule, and the sub-collection document subsubsubmodule. Piece of cake ;)
The only thing to be aware of is that collection group queries in Firestore run against all collections that have the provided name, so the results will be unexpected if there are subcollections of the same name under a collection other than the one we query against in v-e-f.
I have a similar use case to what is presented here. https://firebase.googleblog.com/2019/06/understanding-collection-group-queries.html
You mean something like this?
And you'd want 1 v-e-f module for all "reviews" across restaurants?
That would be fantastic. I have a few cases where this would be useful. Currently I would make a batch to add/edit documents in multiple collections (eg. staff list, org list, and user list). Would be nice to have them under the user list, but be able to build the other lists needed from it.
(...though I just realise this example isn't the best as my rules need to prevent org from reading all user lists)
I don't think @berendsmatt actually cares if they are in a same module or not, as long as he has an easy way to iterate on them, right?
Sorry late reply (Christmas holidays),
As long as they can be sorted and filtered together.
Can we use vuex-easy-firestore to run CollectionGroup Queries ? This new feature of Firestore can make more natural some database designs. Thanks for your help on this issue.
Great package by the way. Thanks for your work.