Execute common code for `reindex()` and `reindex_dirty()`.
(self, dirty: bool)
| 2941 | self._dirtycache = True |
| 2942 | |
| 2943 | def _do_reindex(self, dirty: bool) -> int: |
| 2944 | """Execute common code for `reindex()` and `reindex_dirty()`.""" |
| 2945 | indexedrows = 0 |
| 2946 | for colname, colindexed in self.colindexed.items(): |
| 2947 | if colindexed: |
| 2948 | indexcol = self.cols._g_col(colname) |
| 2949 | indexedrows = indexcol._do_reindex(dirty) |
| 2950 | # Update counters in case some column has been updated |
| 2951 | if indexedrows > 0: |
| 2952 | self._indexedrows = indexedrows |
| 2953 | self._unsaved_indexedrows = self.nrows - indexedrows |
| 2954 | |
| 2955 | return SizeType(indexedrows) |
| 2956 | |
| 2957 | def reindex(self) -> None: |
| 2958 | """Recompute all the existing indexes in the table. |
no test coverage detected