MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / list_collection_names

Function list_collection_names

mongoengine/pymongo_support.py:70–80  ·  view source on GitHub ↗

Pymongo>3.7 deprecates collection_names in favour of list_collection_names

(db, include_system_collections=False)

Source from the content-addressed store, hash-verified

68
69
70def list_collection_names(db, include_system_collections=False):
71 """Pymongo>3.7 deprecates collection_names in favour of list_collection_names"""
72 if PYMONGO_VERSION >= (3, 7):
73 collections = db.list_collection_names()
74 else:
75 collections = db.collection_names()
76
77 if not include_system_collections:
78 collections = [c for c in collections if not c.startswith("system.")]
79
80 return collections

Callers 9

tearDownMethod · 0.90
tearDownMethod · 0.90
tearDownMethod · 0.90
test_drop_collectionMethod · 0.90
tearDownMethod · 0.90
tearDownMethod · 0.90

Calls

no outgoing calls

Tested by 7

tearDownMethod · 0.72
tearDownMethod · 0.72
tearDownMethod · 0.72
test_drop_collectionMethod · 0.72
tearDownMethod · 0.72
tearDownMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…