class documentation

class AnnotatedFromClause(Annotated): (source)

View In Hierarchy

Undocumented

Property c proxy the .c collection of the underlying FromClause.
Method _copy_internals Reassign internal elements to be clones of themselves.

Inherited from Annotated:

Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ Undocumented
Method __new__ Undocumented
Method __reduce__ Undocumented
Instance Variable __dict__ Undocumented
Property entity_namespace Undocumented
Class Method _as_annotated_instance Undocumented
Method _annotate Undocumented
Method _clone clone this element
Method _compiler_dispatch Undocumented
Method _deannotate Undocumented
Method _with_annotations Undocumented
Class Variable _is_column_operators Undocumented
Instance Variable __element Undocumented
Instance Variable _annotations Undocumented
Instance Variable _hash Undocumented
Property _constructor Undocumented

Inherited from SupportsAnnotations (via Annotated):

Class Variable __slots__ Undocumented
Class Variable proxy_set Undocumented
Method _gen_annotations_cache_key Undocumented
Class Variable _is_immutable Undocumented
Property _annotations_cache_key Undocumented

Inherited from ExternallyTraversible (via Annotated, SupportsAnnotations):

Method get_children Return immediate child :class:`.visitors.HasTraverseInternals` elements of this :class:`.visitors.HasTraverseInternals`.

Inherited from HasTraverseInternals (via Annotated, SupportsAnnotations, ExternallyTraversible):

Class Variable _traverse_internals Undocumented

Inherited from Visitable (via Annotated, SupportsAnnotations, ExternallyTraversible, HasTraverseInternals):

Method __class_getitem__ Undocumented
Method __init_subclass__ Undocumented
Class Variable __visit_name__ Undocumented
Class Method _generate_compiler_dispatch Undocumented
Class Variable _original_compiler_dispatch Undocumented

proxy the .c collection of the underlying FromClause. Originally implemented in 2008 as a simple load of the .c collection when the annotated construct was created (see d3621ae961a), in modern SQLAlchemy versions this can be expensive for statements constructed with ORM aliases. So for #8796 SQLAlchemy 2.0 we instead proxy it, which works just as well. Two different use cases seem to require the collection either copied from the underlying one, or unique to this AnnotatedFromClause. See test_selectable->test_annotated_corresponding_column

def _copy_internals(self, **kw: Any): (source)

Reassign internal elements to be clones of themselves. Called during a copy-and-traverse operation on newly shallow-copied elements to create a deep copy. The given clone function should be used, which may be applying additional transformations to the element (i.e. replacement traversal, cloned traversal, annotations).