8000 Update delete_full_collection sample to use batch_size as the limit (… · crowdus/python-docs-samples@2392042 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2392042

Browse files
authored
Update delete_full_collection sample to use batch_size as the limit (GoogleCloudPlatform#2216)
1 parent 210b7b2 commit 2392042

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firestore/cloud-client/snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ def delete_full_collection():
802802

803803
# [START delete_full_collection]
804804
def delete_collection(coll_ref, batch_size):
805-
docs = coll_ref.limit(10).stream()
805+
docs = coll_ref.limit(batch_size).get()
806806
deleted = 0
807807

808808
for doc in docs:

0 commit comments

Comments
 (0)
0