Skip to content

Commit

Permalink
chore: add note about preference of stream() to get() (#3972)
Browse files Browse the repository at this point in the history
* Add note about CollectionRef get deprecation.

* Update note.

Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
Co-authored-by: Takashi Matsuo <tmatsuo@google.com>
  • Loading branch information
3 people committed Jun 5, 2020
1 parent 1cb0963 commit f3a9eef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions firestore/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def get_custom_class():
def get_simple_query():
db = firestore.Client()
# [START get_simple_query]
# Note: Use of CollectionRef stream() is prefered to get()
docs = db.collection(u'cities').where(u'capital', u'==', True).stream()

for doc in docs:
Expand Down

0 comments on commit f3a9eef

Please sign in to comment.