MCPcopy Create free account
hub / github.com/PyTables/PyTables / _set_column_indexing

Method _set_column_indexing

tables/table.py:2903–2913  ·  view source on GitHub ↗

Mark the referred column as indexed or non-indexed.

(self, colpathname: str, indexed: bool)

Source from the content-addressed store, hash-verified

2901 super()._g_remove(recursive, force)
2902
2903 def _set_column_indexing(self, colpathname: str, indexed: bool) -> None:
2904 """Mark the referred column as indexed or non-indexed."""
2905 colindexed = self.colindexed
2906 isindexed, wasindexed = bool(indexed), colindexed[colpathname]
2907 if isindexed == wasindexed:
2908 return # indexing state is unchanged
2909
2910 # Changing the set of indexed columns invalidates the condition cache
2911 self._condition_cache.clear()
2912 colindexed[colpathname] = isindexed
2913 self.indexed = max(colindexed.values()) # this is an OR :)
2914
2915 def _mark_columns_as_dirty(self, colnames: list[str]) -> None:
2916 """Mark column indexes in `colnames` as dirty."""

Callers 2

_column__create_indexFunction · 0.80
remove_indexMethod · 0.80

Calls 2

clearMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected