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

Method _f_remove

tables/node.py:527–544  ·  view source on GitHub ↗

Remove this node from the hierarchy. If the node has children, recursive removal must be stated by giving recursive a true value; otherwise, a NodeError will be raised. If the node is a link to a Group object, and you are sure that you want to delete it, you can do

(self, recursive: bool = False, force: bool = False)

Source from the content-addressed store, hash-verified

525 self._g_delete(parent)
526
527 def _f_remove(self, recursive: bool = False, force: bool = False) -> None:
528 """Remove this node from the hierarchy.
529
530 If the node has children, recursive removal must be stated by giving
531 recursive a true value; otherwise, a NodeError will be raised.
532
533 If the node is a link to a Group object, and you are sure that you want
534 to delete it, you can do this by setting the force flag to true.
535
536 """
537 self._g_check_open()
538 file_ = self._v_file
539 file_._check_writable()
540
541 if file_.is_undo_enabled():
542 self._g_remove_and_log(recursive, force)
543 else:
544 self._g_remove(recursive, force)
545
546 def _g_remove_and_log(self, recursive: bool, force: bool) -> None:
547 file_ = self._v_file

Callers 9

removeMethod · 0.45
_g_maybe_removeMethod · 0.45
removeMethod · 0.45
_g_removeMethod · 0.45
_do_reindexMethod · 0.45
remove_indexMethod · 0.45
remove_nodeMethod · 0.45
test08_removeMethod · 0.45
test03_removeGroupMethod · 0.45

Calls 5

_g_check_openMethod · 0.95
_g_remove_and_logMethod · 0.95
_g_removeMethod · 0.95
_check_writableMethod · 0.80
is_undo_enabledMethod · 0.80

Tested by 2

test08_removeMethod · 0.36
test03_removeGroupMethod · 0.36