MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / changed

Method changed

lib/sqlalchemy/ext/mutable.py:759–768  ·  view source on GitHub ↗

Subclasses should call this method whenever change events occur.

(self)

Source from the content-addressed store, hash-verified

757 return {attribute.key}.union(attribute.property._attribute_keys)
758
759 def changed(self) -> None:
760 """Subclasses should call this method whenever change events occur."""
761
762 for parent, key in self._parents.items():
763 prop = parent.mapper.get_property(key)
764 for value, attr_name in zip(
765 prop._composite_values_from_instance(self),
766 prop._attribute_keys,
767 ):
768 setattr(parent.obj(), attr_name, value)
769
770
771def _setup_composite_listener() -> None:

Callers

nothing calls this directly

Calls 3

get_propertyMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected