MCPcopy Index your code
hub / github.com/PyTables/PyTables / flush

Method flush

tables/table.py:3131–3150  ·  view source on GitHub ↗

Flush the table buffers.

(self)

Source from the content-addressed store, hash-verified

3129 )
3130
3131 def flush(self) -> None:
3132 """Flush the table buffers."""
3133 if self._v_file._iswritable():
3134 # Flush rows that remains to be appended
3135 if "row" in self.__dict__:
3136 self.row._flush_buffered_rows()
3137 if self.indexed and self.autoindex:
3138 # Flush any unindexed row
3139 rowsadded = self.flush_rows_to_index(_lastrow=True)
3140 assert rowsadded <= 0 or self._indexedrows == self.nrows, (
3141 "internal error: the number of indexed rows (%d) "
3142 "and rows in the table (%d) is not equal; "
3143 "please report this to the authors."
3144 % (self._indexedrows, self.nrows)
3145 )
3146 if self._dirtyindexes:
3147 # Finally, re-index any dirty column
3148 self.reindex_dirty()
3149
3150 super().flush()
3151
3152 def _g_pre_kill_hook(self) -> None:
3153 """Code to be called before killing the node."""

Callers 3

_f_closeMethod · 0.95
append_whereMethod · 0.45
_g_copy_rowsMethod · 0.45

Calls 3

flush_rows_to_indexMethod · 0.95
reindex_dirtyMethod · 0.95
_iswritableMethod · 0.80

Tested by

no test coverage detected