class documentation
class _AssociationCollection(Generic[
Known subclasses: sqlalchemy.ext.associationproxy._AssociationDict
, sqlalchemy.ext.associationproxy._AssociationSingleItem
Undocumented
Method | __bool__ |
Undocumented |
Method | __getstate__ |
Undocumented |
Method | __init__ |
Constructs an _AssociationCollection. |
Method | __len__ |
Undocumented |
Method | __setstate__ |
Undocumented |
Method | clear |
Undocumented |
Class Variable | col |
Undocumented |
Instance Variable | creator |
A function that creates new target entities. Given one parameter: value. This assertion is assumed:: |
Instance Variable | getter |
A function. Given an associated object, return the 'value'. |
Instance Variable | lazy |
A callable returning a list-based collection of entities (usually an object attribute managed by a SQLAlchemy relationship()) |
Instance Variable | parent |
Undocumented |
Instance Variable | setter |
A function. Given an associated object and a value, store that value on the object. |
def __init__(self, lazy_collection:
_LazyCollectionProtocol[ _IT]
, creator: _CreatorProtocol
, getter: _GetterProtocol[ _IT]
, setter: _SetterProtocol
, parent: AssociationProxyInstance[ _IT]
):
(source)
¶
Constructs an _AssociationCollection. This will always be a subclass of either _AssociationList, _AssociationSet, or _AssociationDict.
overridden in
sqlalchemy.ext.associationproxy._AssociationDict
, sqlalchemy.ext.associationproxy._AssociationSingleItem
A function that creates new target entities. Given one parameter: value. This assertion is assumed:: obj = creator(somevalue) assert getter(obj) == somevalue
A callable returning a list-based collection of entities (usually an object attribute managed by a SQLAlchemy relationship())
overridden in
sqlalchemy.ext.associationproxy._AssociationDict
, sqlalchemy.ext.associationproxy._AssociationSingleItem
A function. Given an associated object and a value, store that value on the object.