Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2392042

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

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎firestore/cloud-client/snippets.py

Copy file name to clipboardExpand all lines: firestore/cloud-client/snippets.py
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.