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

Method _flush_buffer

gridfs/synchronous/grid_file.py:1285–1289  ·  view source on GitHub ↗

Flush the buffer contents out to a chunk.

(self, force: bool = False)

Source from the content-addressed store, hash-verified

1283 self._position += len(data)
1284
1285 def _flush_buffer(self, force: bool = False) -> None:
1286 """Flush the buffer contents out to a chunk."""
1287 self._flush_data(self._buffer.getvalue(), force=force)
1288 self._buffer.close()
1289 self._buffer = io.BytesIO()
1290
1291 def _flush(self) -> Any:
1292 """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