FirestoreGoogleAppsScript icon indicating copy to clipboard operation
FirestoreGoogleAppsScript copied to clipboard

Group Collection

Open halahmadi opened this issue 4 years ago • 3 comments

Thank you for this amazing work. I would love to see the feature group collection query. It simplifies so much complexity.

halahmadi avatar Feb 08 '21 12:02 halahmadi

I'm using this:

function collectionGroup(firestore, id) {
  const query = firestore.query();
  query.from=[{collectionId:id, allDescendants: true}];
  return query;
}

ribrdb avatar Apr 16 '21 21:04 ribrdb

Are you referring to grabbing all nested documents, @halahmadi? You should be able to loop through the nested collections yourself.

LaughDonor avatar Sep 01 '21 22:09 LaughDonor

Think it's something like this https://firebase.googleblog.com/2019/06/understanding-collection-group-queries.html

ronykrell avatar Nov 08 '21 05:11 ronykrell