class WriteOnlyAttributeImpl(attributes.HasCollectionAdapter, attributes.AttributeImpl): (source)
Known subclasses: sqlalchemy.orm.dynamic.DynamicAttributeImpl
Undocumented
Method | __init__ |
Construct an AttributeImpl. |
Method | append |
Undocumented |
Method | delete |
Undocumented |
Method | fire |
Undocumented |
Method | fire |
Undocumented |
Method | get |
Retrieve a value from the given object. If a callable is assembled on this object's attribute, and passive is False, the callable will be executed and the resulting value will be set as the new value for this attribute. |
Method | get |
Return a list of tuples of (state, obj) for all objects in this attribute's current state + history. |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | pop |
Undocumented |
Method | remove |
Undocumented |
Method | set |
Undocumented |
Method | set |
set an attribute value on the given instance and 'commit' it. |
Class Variable | collection |
Undocumented |
Class Variable | default |
Undocumented |
Class Variable | dynamic |
Undocumented |
Class Variable | supports |
Undocumented |
Class Variable | uses |
Undocumented |
Instance Variable | order |
Undocumented |
Instance Variable | query |
Undocumented |
Instance Variable | target |
Undocumented |
Method | _get |
Undocumented |
Method | _modified |
Undocumented |
Class Variable | _supports |
Undocumented |
Property | _append |
Undocumented |
Property | _remove |
Undocumented |
Inherited from HasCollectionAdapter
:
Class Variable | __slots__ |
Undocumented |
Method | _dispose |
Undocumented |
Class Variable | _is |
Undocumented |
Inherited from AttributeImpl
(via HasCollectionAdapter
):
Method | __str__ |
Undocumented |
Method | get |
return the unchanged value of this attribute |
Method | hasparent |
Return the boolean value of a `hasparent` flag attached to the given state. |
Method | sethasparent |
Set a boolean flag on the given item corresponding to whether or not it is attached to a parent object via the attribute represented by this ``InstrumentedAttribute``. |
Class Variable | active |
Undocumented |
Instance Variable | accepts |
Undocumented |
Instance Variable | callable_ |
Undocumented |
Instance Variable | class_ |
Undocumented |
Instance Variable | dispatch |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | key |
Undocumented |
Instance Variable | load |
Undocumented |
Instance Variable | parent |
Undocumented |
Instance Variable | send |
Undocumented |
Instance Variable | trackparent |
Undocumented |
Method | _default |
Produce an empty value for an uninitialized scalar attribute. |
Method | _fire |
Undocumented |
Method | _get |
Backwards compat for impl.active_history |
Method | _set |
Undocumented |
Class Variable | _replace |
Undocumented |
Instance Variable | _deferred |
Undocumented |
Instance Variable | _modified |
Undocumented |
sqlalchemy.orm.dynamic.DynamicAttributeImpl
Construct an AttributeImpl. :param \class_: associated class :param key: string name of the attribute :param \callable_: optional function which generates a callable based on a parent instance, which produces the "default" values for a scalar or collection attribute when it's first accessed, if not present already. :param trackparent: if True, attempt to track if an instance has a parent attached to it via this attribute. :param compare_function: a function that compares two values which are normally assignable to this attribute. :param active_history: indicates that get_history() should always return the "old" value, even if it means executing a lazy callable upon attribute change. :param parent_token: Usually references the MapperProperty, used as a key for the hasparent() function to identify an "owning" attribute. Allows multiple AttributeImpls to all match a single owner attribute. :param load_on_unexpire: if False, don't include this attribute in a load-on-expired operation, i.e. the "expired_attribute_loader" process. The attribute can still be in the "expired" list and be considered to be "expired". Previously, this flag was called "expire_missing" and is only used by a deferred column attribute. :param send_modified_events: if False, the InstanceState._modified_event method will have no effect; this means the attribute will never show up as changed in a history entry.
Retrieve a value from the given object. If a callable is assembled on this object's attribute, and passive is False, the callable will be executed and the resulting value will be set as the new value for this attribute.
Return a list of tuples of (state, obj) for all objects in this attribute's current state + history. Only applies to object-based attributes. This is an inlining of existing functionality which roughly corresponds to: get_state_history( state, key, passive=PASSIVE_NO_INITIALIZE).sum()
InstanceState[ Any]
, dict_: _InstanceDict
, user_data: Literal[ None]
= ..., passive: Literal[ PassiveFlag.PASSIVE_OFF]
= ...) -> CollectionAdapter
:InstanceState[ Any]
, dict_: _InstanceDict
, user_data: _AdaptedCollectionProtocol
= ..., passive: PassiveFlag
= ...) -> CollectionAdapter
:InstanceState[ Any]
, dict_: _InstanceDict
, user_data: Optional[ _AdaptedCollectionProtocol]
= ..., passive: PassiveFlag
= ...) -> Union[ Literal[ LoaderCallableStatus.PASSIVE_NO_RESULT], CollectionAdapter]
:Undocumented
InstanceState[ Any]
, dict_: _InstanceDict
, value: Any
, initiator: Optional[ AttributeEventToken]
= None, passive: PassiveFlag
= PassiveFlag.PASSIVE_OFF, check_old: Any
= None, pop: bool
= False, _adapt: bool
= True):
(source)
¶
Undocumented