简体   繁体   中英

How to get the id's for all documents without the data in a parsed collection in Firebase Firestore?

I'm trying to get all the ids of all documents from a parsed collection without being charged for getting the document data. Will I be charged for receiving the data if I use this code below?

  db.collection("owners").get().then(function(querySnapshot) {
      querySnapshot.forEach(function(doc) {
          console.log(doc.id);
      });
  });

This the database: 在此处输入图片说明

Yes, you will be changed a document read for each of documents in the collection. There's no way to do this without reading the documents.

How to get a list of document IDs in a collection Cloud Firestore?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM