class documentation

class Annotated(object):

Known subclasses: sqlalchemy.sql.elements.AnnotatedColumnElement, sqlalchemy.sql.selectable.AnnotatedFromClause

View In Hierarchy

clones a SupportsAnnotated and applies an 'annotations' dictionary.

Unlike regular clones, this clone also mimics __hash__() and __cmp__() of the original element so that it takes its place in hashed collections.

A reference to the original element is maintained, for the important reason of keeping its hash value current. When GC'ed, the hash value may be reused, causing conflicts.

Note

The rationale for Annotated producing a brand new class, rather than placing the functionality directly within ClauseElement, is performance. The __hash__() method is absent on plain ClauseElement which leads to significantly reduced function call overhead, as the use of sets and dictionaries against ClauseElement objects is prevalent, but most are not "annotated".

Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ Undocumented
Method __new__ Undocumented
Method __reduce__ Undocumented
Method ​_annotate Undocumented
Method ​_clone Undocumented
Method ​_compiler​_dispatch Undocumented
Method ​_deannotate Undocumented
Method ​_with​_annotations Undocumented
Class Variable ​_is​_column​_operators Undocumented
Instance Variable __dict__ Undocumented
Instance Variable __element Undocumented
Instance Variable ​_annotations Undocumented
Instance Variable ​_hash Undocumented
Property ​_constructor Undocumented
Property entity​_namespace Undocumented
def __eq__(self, other):

Undocumented

def __hash__(self):

Undocumented

def __init__(self, element, values):
def __new__(cls, *args):

Undocumented

def __reduce__(self):

Undocumented

def _annotate(self, values):

Undocumented

def _clone(self, **kw):

Undocumented

def _compiler_dispatch(self, visitor, **kw):

Undocumented

def _deannotate(self, values=None, clone=True):

Undocumented

def _with_annotations(self, values):
_is_column_operators: bool =

Undocumented

__dict__ =

Undocumented

__element =

Undocumented

_annotations =

Undocumented

_hash =

Undocumented

@property
_constructor =

Undocumented

@property
entity_namespace =

Undocumented