MCPcopy
hub / github.com/piccolo-orm/piccolo / get_auto_update_values

Method get_auto_update_values

piccolo/table.py:196–206  ·  view source on GitHub ↗

If columns have ``auto_update`` defined, then we retrieve these values.

(self)

Source from the content-addressed store, hash-verified

194 return column_object
195
196 def get_auto_update_values(self) -> dict[Column, Any]:
197 """
198 If columns have ``auto_update`` defined, then we retrieve these values.
199 """
200 output: dict[Column, Any] = {}
201 for column in self.auto_update_columns:
202 value = column._meta.auto_update
203 if callable(value):
204 value = value()
205 output[column] = value
206 return output
207
208
209class TableMetaclass(type):

Callers 2

saveMethod · 0.80
updateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected