MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / changed

Method changed

cassandra/cqlengine/columns.py:45–64  ·  view source on GitHub ↗

Indicates whether or not this value has changed. :rtype: boolean

(self)

Source from the content-addressed store, hash-verified

43
44 @property
45 def changed(self):
46 """
47 Indicates whether or not this value has changed.
48
49 :rtype: boolean
50
51 """
52 if self.explicit:
53 return self.value != self.previous_value
54
55 if isinstance(self.column, BaseContainerColumn):
56 default_value = self.column.get_default()
57 if self.column._val_is_null(default_value):
58 return not self.column._val_is_null(self.value) and self.value != self.previous_value
59 elif self.previous_value is None:
60 return self.value != default_value
61
62 return self.value != self.previous_value
63
64 return False
65
66 def reset_previous_value(self):
67 self.previous_value = deepcopy(self.value)

Callers

nothing calls this directly

Calls 2

get_defaultMethod · 0.80
_val_is_nullMethod · 0.45

Tested by

no test coverage detected