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

Method autoindex

tables/table.py:626–655  ·  view source on GitHub ↗

Is True if the `Table` automatically keep column indexes up to date. Setting this value states whether existing indexes should be automatically updated after an append operation or recomputed after an index-invalidating operation (i.e. removal and modification of row

(self)

Source from the content-addressed store, hash-verified

624
625 @property
626 def autoindex(self) -> bool:
627 """Is True if the `Table` automatically keep column indexes up to date.
628
629 Setting this value states whether existing indexes should be
630 automatically updated after an append operation or recomputed
631 after an index-invalidating operation (i.e. removal and
632 modification of rows). The default is true.
633
634 This value gets into effect whenever a column is altered. If you
635 don't have automatic indexing activated and you want to do an
636 immediate update use `Table.flush_rows_to_index()`; for an immediate
637 reindexing of invalidated indexes, use `Table.reindex_dirty()`.
638
639 This value is persistent.
640
641 .. versionchanged:: 3.0
642 The *autoIndex* property has been renamed into *autoindex*.
643 """
644 if self._autoindex is None:
645 try:
646 indexgroup = self._v_file._get_node(_index_pathname_of(self))
647 except NoSuchNodeError:
648 self._autoindex = default_auto_index # update cache
649 return self._autoindex
650 else:
651 self._autoindex = indexgroup.auto # update cache
652 return self._autoindex
653 else:
654 # The value is in cache, return it
655 return self._autoindex
656
657 @autoindex.setter
658 def autoindex(self, auto: bool) -> None:

Callers

nothing calls this directly

Calls 3

_index_pathname_ofFunction · 0.85
create_indexes_tableFunction · 0.85
_get_nodeMethod · 0.80

Tested by

no test coverage detected