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

Method abort

gridfs/asynchronous/grid_file.py:1198–1202  ·  view source on GitHub ↗

Remove all chunks/files that may have been uploaded and close.

(self)

Source from the content-addressed store, hash-verified

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."""
1200 await self._coll.chunks.delete_many({"files_id": self._file["_id"]}, session=self._session)
1201 await self._coll.files.delete_one({"_id": self._file["_id"]}, session=self._session)
1202 object.__setattr__(self, "_closed", True)
1203
1204 @property
1205 def closed(self) -> bool:

Callers 2

writeMethod · 0.95
_write_asyncMethod · 0.95

Calls 3

delete_manyMethod · 0.45
delete_oneMethod · 0.45
__setattr__Method · 0.45

Tested by

no test coverage detected