class documentation

class InstrumentedAttribute(Mapped):

View In Hierarchy

Class bound instrumented attribute which adds basic :term:`descriptor` methods.

See .QueryableAttribute for a description of most features.

Method __delete__ Undocumented
Method __get__ Undocumented
Method __set__ Undocumented
Class Variable inherit​_cache Indicate if this .HasCacheKey instance should make use of the cache key generation scheme used by its immediate superclass.

Inherited from QueryableAttribute (via Mapped):

Method __clause​_element__ Undocumented
Method __getattr__ Undocumented
Method __init__ Undocumented
Method __reduce__ Undocumented
Method __str__ Undocumented
Method ​_bulk​_update​_tuples Return setter tuples for a bulk UPDATE.
Method ​_clone Undocumented
Method adapt​_to​_entity Return a copy of this PropComparator which will use the given .AliasedInsp to produce corresponding expressions.
Method and​_ Add additional criteria to the ON clause that's represented by this relationship attribute.
Method get​_history Undocumented
Method hasparent Undocumented
Method label Undocumented
Method of​_type Redefine this object in terms of a polymorphic subclass, _orm.with_polymorphic construct, or _orm.aliased construct.
Method operate Operate on an argument.
Method reverse​_operate Reverse operate on an argument.
Class Variable __visit​_name__ Undocumented
Class Variable ​_cache​_key​_traversal Undocumented
Class Variable is​_attribute True if this object is a Python :term:`descriptor`.
Instance Variable ​_extra​_criteria Undocumented
Instance Variable ​_of​_type Undocumented
Instance Variable ​_parententity Undocumented
Instance Variable class​_ Undocumented
Instance Variable comparator Undocumented
Instance Variable impl Undocumented
Instance Variable key Undocumented
Property ​_annotations Undocumented
Property ​_entity​_namespace Undocumented
Property ​_from​_objects Undocumented
Property ​_impl​_uses​_objects Undocumented
Property ​_supports​_population Undocumented
Property expression The SQL expression object represented by this .QueryableAttribute.
Property info Return the 'info' dictionary for the underlying SQL element.
Property parent Return an inspection instance representing the parent.
Property property Return the .MapperProperty associated with this .QueryableAttribute.

Inherited from _MappedAttribute (via Mapped, QueryableAttribute):

Class Variable __slots__ Undocumented

Inherited from InspectionAttr (via Mapped, QueryableAttribute):

Class Variable __slots__ Undocumented
Class Variable ​_is​_internal​_proxy True if this object is an internal proxy object.
Class Variable is​_aliased​_class True if this object is an instance of .AliasedClass.
Class Variable is​_bundle True if this object is an instance of .Bundle.
Class Variable is​_clause​_element True if this object is an instance of _expression.ClauseElement.
Class Variable is​_instance True if this object is an instance of .InstanceState.
Class Variable is​_mapper True if this object is an instance of _orm.Mapper.
Class Variable is​_property True if this object is an instance of .MapperProperty.
Class Variable is​_selectable Return True if this object is an instance of _expression.Selectable.

Inherited from PropComparator (via Mapped, QueryableAttribute):

Static Method any​_op Undocumented
Static Method has​_op Undocumented
Static Method of​_type​_op Undocumented
Method any Return true if this collection contains any member that meets the given criterion.
Method has Return true if this element references a member which meets the given criterion.
Class Variable __slots__ Undocumented
Instance Variable ​_adapt​_to​_entity Undocumented
Instance Variable prop Undocumented
Property ​_parentmapper legacy; this is renamed to _parententity to be compatible with QueryableAttribute.
Property ​_propagate​_attrs Undocumented
Property adapter Produce a callable that adapts column expressions to suit an aliased version of this comparator.

Inherited from ColumnOperators (via Mapped, QueryableAttribute, PropComparator):

Method __add__ Implement the + operator.
Method __contains__ Undocumented
Method __div__ Implement the / operator.
Method __eq__ Implement the == operator.
Method __ge__ Implement the >= operator.
Method __getitem__ Implement the [] operator.
Method __gt__ Implement the > operator.
Method __le__ Implement the <= operator.
Method __lshift__ implement the << operator.
Method __lt__ Implement the < operator.
Method __mod__ Implement the % operator.
Method __mul__ Implement the * operator.
Method __ne__ Implement the != operator.
Method __neg__ Implement the - operator.
Method __radd__ Implement the + operator in reverse.
Method __rdiv__ Implement the / operator in reverse.
Method __rmod__ Implement the % operator in reverse.
Method __rmul__ Implement the * operator in reverse.
Method __rshift__ implement the >> operator.
Method __rsub__ Implement the - operator in reverse.
Method __rtruediv__ Implement the // operator in reverse.
Method __sub__ Implement the - operator.
Method __truediv__ Implement the // operator.
Method all​_ Produce an _expression.all_ clause against the parent object.
Method any​_ Produce an _expression.any_ clause against the parent object.
Method asc Produce a _expression.asc clause against the parent object.
Method between Produce a _expression.between clause against the parent object, given the lower and upper range.
Method collate Produce a _expression.collate clause against the parent object, given the collation string.
Method concat Implement the 'concat' operator.
Method contains Implement the 'contains' operator.
Method desc Produce a _expression.desc clause against the parent object.
Method distinct Produce a _expression.distinct clause against the parent object.
Method endswith Implement the 'endswith' operator.
Method ilike Implement the ilike operator, e.g. case insensitive LIKE.
Method in​_ Implement the in operator.
Method is​_ Implement the IS operator.
Method is​_distinct​_from Implement the IS DISTINCT FROM operator.
Method is​_not Implement the IS NOT operator.
Method is​_not​_distinct​_from Implement the IS NOT DISTINCT FROM operator.
Method like Implement the like operator.
Method match Implements a database-specific 'match' operator.
Method not​_ilike implement the NOT ILIKE operator.
Method not​_in implement the NOT IN operator.
Method not​_like implement the NOT LIKE operator.
Method nulls​_first Produce a _expression.nulls_first clause against the parent object.
Method nulls​_last Produce a _expression.nulls_last clause against the parent object.
Method regexp​_match Implements a database-specific 'regexp match' operator.
Method regexp​_replace Implements a database-specific 'regexp replace' operator.
Method startswith Implement the startswith operator.
Class Variable timetuple Hack, allows datetime objects to be compared on the LHS.

Inherited from Operators (via Mapped, QueryableAttribute, PropComparator, ColumnOperators):

Method __and__ Implement the & operator.
Method __invert__ Implement the ~ operator.
Method __or__ Implement the | operator.
Method bool​_op Return a custom boolean operator.
Method op Produce a generic operator function.

Inherited from HasCopyInternals (via Mapped, QueryableAttribute):

Method ​_copy​_internals Reassign internal elements to be clones of themselves.

Inherited from JoinTargetRole (via Mapped, QueryableAttribute):

Class Variable ​_role​_name Undocumented

Inherited from AllowsLambdaRole (via Mapped, QueryableAttribute, JoinTargetRole):

Class Variable allows​_lambda Undocumented

Inherited from UsesInspection (via Mapped, QueryableAttribute, JoinTargetRole):

Class Variable ​_post​_inspect Undocumented
Class Variable uses​_inspection Undocumented

Inherited from SQLRole (via Mapped, QueryableAttribute, JoinTargetRole, StructuralRole):

Class Variable allows​_lambda Undocumented
Class Variable uses​_inspection Undocumented

Inherited from OnClauseRole (via Mapped, QueryableAttribute):

Class Variable ​_role​_name Undocumented

Inherited from AllowsLambdaRole (via Mapped, QueryableAttribute, OnClauseRole):

Class Variable allows​_lambda Undocumented

Inherited from SQLRole (via Mapped, QueryableAttribute, OnClauseRole, StructuralRole):

Class Variable allows​_lambda Undocumented
Class Variable uses​_inspection Undocumented

Inherited from Immutable (via Mapped, QueryableAttribute):

Method ​_copy​_internals Undocumented
Method params Undocumented
Method unique​_params Undocumented
Class Variable ​_is​_immutable Undocumented

Inherited from MemoizedHasCacheKey (via Mapped, QueryableAttribute):

Method ​_generate​_cache​_key return a cache key.

Inherited from HasCacheKey (via Mapped, QueryableAttribute, MemoizedHasCacheKey):

Class Method ​_generate​_cache​_attrs generate cache key dispatcher for a new class.
Class Method ​_generate​_cache​_key​_for​_object Undocumented
Method ​_gen​_cache​_key return an optional cache key.
Class Variable __slots__ Undocumented
Class Variable ​_hierarchy​_supports​_caching private attribute which may be set to False to prevent the inherit_cache warning from being emitted for a hierarchy of subclasses.
Class Variable ​_is​_has​_cache​_key Undocumented
def __delete__(self, instance):
def __get__(self, instance, owner):
def __set__(self, instance, value):
inherit_cache: bool =

Indicate if this .HasCacheKey instance should make use of the cache key generation scheme used by its immediate superclass.

The attribute defaults to None, which indicates that a construct has not yet taken into account whether or not its appropriate for it to participate in caching; this is functionally equivalent to setting the value to False, except that a warning is also emitted.

This flag can be set to True on a particular class, if the SQL that corresponds to the object does not change based on attributes which are local to this class, and not its superclass.

See Also

:ref:`compilerext_caching` - General guideslines for setting the .HasCacheKey.inherit_cache attribute for third-party or user defined SQL constructs.