Re-index columns in `colnames` if automatic indexing is true.
(self, colnames: list[str])
| 2924 | col.index.dirty = True |
| 2925 | |
| 2926 | def _reindex(self, colnames: list[str]) -> None: |
| 2927 | """Re-index columns in `colnames` if automatic indexing is true.""" |
| 2928 | if self.indexed: |
| 2929 | colindexed, cols = self.colindexed, self.cols |
| 2930 | colstoindex = [] |
| 2931 | # Mark the proper indexes as dirty |
| 2932 | for colname in colnames: |
| 2933 | if colindexed[colname]: |
| 2934 | col = cols._g_col(colname) |
| 2935 | col.index.dirty = True |
| 2936 | colstoindex.append(colname) |
| 2937 | # Now, re-index the dirty ones |
| 2938 | if self.autoindex and colstoindex: |
| 2939 | self._do_reindex(dirty=True) |
| 2940 | # The table caches for indexed queries are dirty now |
| 2941 | self._dirtycache = True |
| 2942 | |
| 2943 | def _do_reindex(self, dirty: bool) -> int: |
| 2944 | """Execute common code for `reindex()` and `reindex_dirty()`.""" |
no test coverage detected