MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / drop_collections

Function drop_collections

test/__init__.py:1297–1300  ·  view source on GitHub ↗
(db: Database)

Source from the content-addressed store, hash-verified

1295
1296
1297def drop_collections(db: Database):
1298 # Drop all non-system collections in this database.
1299 for coll in db.list_collection_names(filter={"name": {"$regex": r"^(?!system\.)"}}):
1300 db.drop_collection(coll)
1301
1302
1303def remove_all_users(db: Database):

Callers

nothing calls this directly

Calls 2

list_collection_namesMethod · 0.45
drop_collectionMethod · 0.45

Tested by

no test coverage detected