class documentation

class AliasedInsp(ORMEntityColumnsClauseRole, ORMFromClauseRole, sql_base.MemoizedHasCacheKey, InspectionAttr):

View In Hierarchy

Provide an inspection interface for an .AliasedClass object.

The .AliasedInsp object is returned given an .AliasedClass using the _sa.inspect function:

from sqlalchemy import inspect
from sqlalchemy.orm import aliased

my_alias = aliased(MyMappedClass)
insp = inspect(my_alias)

Attributes on .AliasedInsp include:

  • entity - the .AliasedClass represented.
  • mapper - the _orm.Mapper mapping the underlying class.
  • selectable - the _expression.Alias construct which ultimately represents an aliased _schema.Table or _expression.Select construct.
  • name - the name of the alias. Also is used as the attribute name when returned in a result tuple from _query.Query.
  • with_polymorphic_mappers - collection of _orm.Mapper objects indicating all those mappers expressed in the select construct for the .AliasedClass.
  • polymorphic_on - an alternate column or SQL expression which will be used as the "discriminator" for a polymorphic load.
Method __clause​_element__ Undocumented
Method __getstate__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method __setstate__ Undocumented
Method __str__ Undocumented
Method ​_adapt​_element Undocumented
Method ​_entity​_for​_mapper Undocumented
Method ​_memo Undocumented
Class Variable ​_cache​_key​_traversal Undocumented
Class Variable is​_aliased​_class always returns True
Instance Variable ​_adapt​_on​_names Undocumented
Instance Variable ​_adapter Undocumented
Instance Variable ​_base​_alias Undocumented
Instance Variable ​_is​_with​_polymorphic Undocumented
Instance Variable ​_nest​_adapters Undocumented
Instance Variable ​_target Undocumented
Instance Variable ​_use​_mapper​_path Undocumented
Instance Variable ​_weak​_entity Undocumented
Instance Variable ​_with​_polymorphic​_entities Undocumented
Instance Variable local​_table Undocumented
Instance Variable mapper Undocumented
Instance Variable name Undocumented
Instance Variable persist​_selectable Undocumented
Instance Variable polymorphic​_on Undocumented
Instance Variable represents​_outer​_join Undocumented
Instance Variable selectable Undocumented
Instance Variable with​_polymorphic​_mappers Undocumented
Property ​_all​_column​_expressions Undocumented
Property ​_get​_clause Undocumented
Property ​_memoized​_values Undocumented
Property ​_path​_registry Undocumented
Property class​_ Return the mapped class ultimately represented by this .AliasedInsp.
Property entity Undocumented
Property entity​_namespace Undocumented

Inherited from ORMEntityColumnsClauseRole:

Class Variable ​_role​_name Undocumented

Inherited from ColumnsClauseRole (via ORMEntityColumnsClauseRole, ORMColumnsClauseRole):

Property ​_select​_iterable Undocumented

Inherited from AllowsLambdaRole (via ORMEntityColumnsClauseRole, ORMColumnsClauseRole, ColumnsClauseRole):

Class Variable allows​_lambda Undocumented

Inherited from UsesInspection (via ORMEntityColumnsClauseRole, ORMColumnsClauseRole, ColumnsClauseRole):

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

Inherited from SQLRole (via ORMEntityColumnsClauseRole, ORMColumnsClauseRole, ColumnsClauseRole, ColumnListRole):

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

Inherited from ORMFromClauseRole:

Class Variable ​_role​_name Undocumented

Inherited from StrictFromClauseRole (via ORMFromClauseRole):

Property description Undocumented

Inherited from FromClauseRole (via ORMFromClauseRole, StrictFromClauseRole):

Class Variable ​_is​_subquery Undocumented
Property ​_hide​_froms Undocumented

Inherited from ColumnsClauseRole (via ORMFromClauseRole, StrictFromClauseRole, FromClauseRole):

Property ​_select​_iterable Undocumented

Inherited from AllowsLambdaRole (via ORMFromClauseRole, StrictFromClauseRole, FromClauseRole, ColumnsClauseRole):

Class Variable allows​_lambda Undocumented

Inherited from UsesInspection (via ORMFromClauseRole, StrictFromClauseRole, FromClauseRole, ColumnsClauseRole):

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

Inherited from SQLRole (via ORMFromClauseRole, StrictFromClauseRole, FromClauseRole, ColumnsClauseRole, ColumnListRole):

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

Inherited from AllowsLambdaRole (via ORMFromClauseRole, StrictFromClauseRole, FromClauseRole, JoinTargetRole):

Class Variable allows​_lambda Undocumented

Inherited from UsesInspection (via ORMFromClauseRole, StrictFromClauseRole, FromClauseRole, JoinTargetRole):

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

Inherited from SQLRole (via ORMFromClauseRole, StrictFromClauseRole, FromClauseRole, JoinTargetRole, StructuralRole):

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

Inherited from MemoizedHasCacheKey:

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

Inherited from HasCacheKey (via MemoizedHasCacheKey):

Class Variable inherit​_cache Indicate if this .HasCacheKey instance should make use of the cache key generation scheme used by its immediate superclass.
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

Inherited from InspectionAttr:

Class Variable __slots__ Undocumented
Class Variable ​_is​_internal​_proxy True if this object is an internal proxy object.
Class Variable is​_attribute True if this object is a Python :term:`descriptor`.
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.
@util.memoized_instancemethod
def __clause_element__(self):

Undocumented

def __getstate__(self):

Undocumented

def __init__(self, entity, inspected, selectable, name, with_polymorphic_mappers, polymorphic_on, _base_alias, _use_mapper_path, adapt_on_names, represents_outer_join, nest_adapters):

Undocumented

def __repr__(self):

Undocumented

def __setstate__(self, state):

Undocumented

def __str__(self):

Undocumented

def _adapt_element(self, elem, key=None):

Undocumented

def _entity_for_mapper(self, mapper):

Undocumented

def _memo(self, key, callable_, *args, **kw):

Undocumented

_cache_key_traversal =

Undocumented

is_aliased_class: bool =
_adapt_on_names =

Undocumented

_adapter =

Undocumented

_base_alias =

Undocumented

_is_with_polymorphic: bool =

Undocumented

_nest_adapters =

Undocumented

_target =

Undocumented

_use_mapper_path =

Undocumented

_weak_entity =

Undocumented

_with_polymorphic_entities: list =

Undocumented

local_table =

Undocumented

mapper =

Undocumented

name =

Undocumented

persist_selectable =

Undocumented

polymorphic_on =

Undocumented

represents_outer_join =

Undocumented

selectable =

Undocumented

with_polymorphic_mappers =

Undocumented

@util.memoized_property
_all_column_expressions =

Undocumented

@util.memoized_property
_get_clause =

Undocumented

@util.memoized_property
_memoized_values =

Undocumented

@property
_path_registry =

Undocumented

@property
class_ =
Return the mapped class ultimately represented by this .AliasedInsp.
@property
entity =

Undocumented

@property
entity_namespace =

Undocumented