Google Firestore - how to get document by multiple ids in one round trip?

前端 未结 11 1805
余生分开走
余生分开走 2020-11-21 22:49

I am wondering if it\'s possible to get multiple documents by list of ids in one round trip (network call) to the Firestore.

11条回答
  •  不知归路
    2020-11-21 23:19

    No, right now there is no way to batch multiple read requests using the Cloud Firestore SDK and therefore no way to guarantee that you can read all of the data at once.

    However as Frank van Puffelen has said in the comments above this does not mean that fetching 3 documents will be 3x as slow as fetching one document. It is best to perform your own measurements before reaching a conclusion here.

提交回复
热议问题