-
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Mongita Collection returns a List[Dict], and should instead return a MutableMapping[str, Any]
See https://pymongo.readthedocs.io/en/stable/api/pymongo/collection.html#pymongo.collection.Collection.index_information
My suggested implementation:
def index_information(self):
ret = {'_id_': {'key': [('_id', 1)]}}
metadata = self._Collection__get_metadata()
for idx in metadata.get('indexes', {}).values():
ret[idx['_id']] = {'key': [(idx['key_str'], idx['direction'])]}
return retReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels