class InspectionAttr: (source)
Known subclasses: sqlalchemy.orm.attributes.QueryableAttribute
, sqlalchemy.orm.base.InspectionAttrInfo
, sqlalchemy.orm.path_registry.PathToken
, sqlalchemy.orm.util.AliasedInsp
, sqlalchemy.orm.util.Bundle
A base class applied to all ORM objects and attributes that are related to things that can be returned by the :func:`_sa.inspect` function. The attributes defined here allow the usage of simple boolean checks to test basic facts about the object returned. While the boolean checks here are basically the same as using the Python isinstance() function, the flags here can be used without the need to import all of these classes, and also such that the SQLAlchemy class system can change while leaving the flags here intact for forwards-compatibility.
Class Variable | __slots__ |
Undocumented |
Class Variable | is |
True if this object is an instance of :class:`.AliasedClass`. |
Class Variable | is |
True if this object is a Python :term:`descriptor`. |
Class Variable | is |
True if this object is an instance of :class:`.Bundle`. |
Class Variable | is |
True if this object is an instance of :class:`_expression.ClauseElement`. |
Class Variable | is |
True if this object is an instance of :class:`.InstanceState`. |
Class Variable | is |
True if this object is an instance of :class:`_orm.Mapper`. |
Class Variable | is |
True if this object is an instance of :class:`.MapperProperty`. |
Class Variable | is |
Return True if this object is an instance of :class:`_expression.Selectable`. |
Class Variable | _is |
True if this object is an internal proxy object. |
sqlalchemy.orm.attributes.QueryableAttribute
, sqlalchemy.orm.base.InspectionAttrInfo
, sqlalchemy.orm.util.AliasedInsp
Undocumented
sqlalchemy.orm.util.AliasedInsp
, sqlalchemy.orm.util.Bundle
True if this object is an instance of :class:`.AliasedClass`.
sqlalchemy.ext.associationproxy.AssociationProxy
, sqlalchemy.ext.hybrid.hybrid_method
, sqlalchemy.ext.hybrid.hybrid_property
, sqlalchemy.orm.attributes.QueryableAttribute
True if this object is a Python :term:`descriptor`. This can refer to one of many types. Usually a :class:`.QueryableAttribute` which handles attributes events on behalf of a :class:`.MapperProperty`. But can also be an extension type such as :class:`.AssociationProxy` or :class:`.hybrid_property`. The :attr:`.InspectionAttr.extension_type` will refer to a constant identifying the specific subtype. .. seealso:: :attr:`_orm.Mapper.all_orm_descriptors`
sqlalchemy.orm.util.Bundle
True if this object is an instance of :class:`_expression.ClauseElement`.
sqlalchemy.orm.state.InstanceState
True if this object is an instance of :class:`.InstanceState`.
sqlalchemy.orm.util.Bundle
True if this object is an instance of :class:`_orm.Mapper`.
sqlalchemy.orm.interfaces.MapperProperty
True if this object is an instance of :class:`.MapperProperty`.