MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / _ensure_indexes

Method _ensure_indexes

gridfs/asynchronous/grid_file.py:1191–1196  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1189 )
1190
1191 async def _ensure_indexes(self) -> None:
1192 if not object.__getattribute__(self, "_ensured_index"):
1193 _disallow_transactions(self._session)
1194 await self._create_index(self._coll.files, _F_INDEX, False)
1195 await self._create_index(self._coll.chunks, _C_INDEX, True)
1196 object.__setattr__(self, "_ensured_index", True)
1197
1198 async def abort(self) -> None:
1199 """Remove all chunks/files that may have been uploaded and close."""

Callers 1

_flush_dataMethod · 0.95

Calls 3

_create_indexMethod · 0.95
_disallow_transactionsFunction · 0.70
__setattr__Method · 0.45

Tested by

no test coverage detected