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

Method _flush_buffer

gridfs/asynchronous/grid_file.py:1297–1301  ·  view source on GitHub ↗

Flush the buffer contents out to a chunk.

(self, force: bool = False)

Source from the content-addressed store, hash-verified

1295 self._position += len(data)
1296
1297 async def _flush_buffer(self, force: bool = False) -> None:
1298 """Flush the buffer contents out to a chunk."""
1299 await self._flush_data(self._buffer.getvalue(), force=force)
1300 self._buffer.close()
1301 self._buffer = io.BytesIO()
1302
1303 async def _flush(self) -> Any:
1304 """Flush the file to the database."""

Callers 3

_flushMethod · 0.95
writeMethod · 0.95
_write_asyncMethod · 0.95

Calls 2

_flush_dataMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected