ConstraintFamilyView

ConstraintFamilyView#

class ConstraintFamilyView#

Live, read-only mapping of one constraint family, created by of_kind. Integers are promoted to the selected ID type; other families raise TypeError. Iteration retains typed IDs. Model rows are attached handles; removed and result rows are snapshots.

__contains__(key: object) → bool#
__eq__(other: Any) → Any#
__getitem__(key: _K | int) → _V_co#

Fetch a row using an integer or an ID of the selected family.

__iter__() → Iterator[_K]#

Snapshot this family’s typed IDs now; fetch rows only when indexed.

__len__() → int#

Number of current rows in the selected family.

__repr__() → str#
get(key: _K | int, default: None = None) → _V_co | None#
get(key: _K | int, default: _T) → _V_co | _T
items() → ItemsView[_K, _V_co]#

Live items view; keys remain typed and rows are fetched on demand.

keys() → KeysView[_K]#

Live keys view. View iterators snapshot IDs on first advance.

values() → ValuesView[_V_co]#

Live values view; rows are fetched on demand.