Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mongodbdb.getCollectionNames()コマンドは、現在のデータベースにあるすべてのコレクション名をリストに表示します。
db.getCollectionNames()
pymongo を使用して同じ出力が必要です。しばらくグーグルで検索しましたが、そのようなものは見つかりませんでした。
そのようなものは存在しますか?
pymongo 3.7 以降collection_names()は廃止され、コレクション名を取得する正しい方法は次のとおりです。list_collection_names()
collection_names()
list_collection_names()