ElementData: Persistent Element State#
- class arch.code.Element.ElementData(*, uid=<factory>, idx=<factory>, created_at=<factory>, updated_at=<factory>)#
The persistent state of an Element: a SQLModel row keyed by uid and idx.
- classmethod new(data=None, **kwargs)#
Build an instance, dispatching to the registered subclass when idx or subclass differ.
- update()#
Refresh the updated_at timestamp.
- classmethod instance_fields()#
Return the instance fields of this model, mapped to their types.
- classmethod field_type(field)#
Return the annotation of the named field, or None if it does not exist.
- classmethod basename()#
Return the class name with any trailing ‘Data’ suffix removed.
- classmethod is_architectonic()#
Return True if this class is defined in an architectonic (underscore-prefixed) module.
- classmethod datatype_for(idx, subclass='')#
Choose a registered datatype based on the passed idx and optional subclass name.
- classmethod build(idx, subclass='', **kwargs)#
Build a new instance for the given index and optional subclass name.
- model_config = {'from_attributes': True, 'registry': PydanticUndefined}#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].