module documentation

The .Annotated class and related routines; creates hash-equivalent copies of SQL constructs which contain context-specific markers and associations.
Constant EMPTY​_ANNOTATIONS Undocumented
Variable annotated​_classes Undocumented
Class ​Annotated clones a SupportsAnnotated and applies an 'annotations' dictionary.
Class ​Supports​Annotations Undocumented
Class ​Supports​Clone​Annotations No class docstring; 0/1 class variable, 3/3 methods documented
Class ​Supports​Wrapping​Annotations No class docstring; 3/3 methods documented
Function ​_deep​_annotate Deep copy the given ClauseElement, annotating each element with the given annotations dictionary.
Function ​_deep​_deannotate Deep copy the given element, removing annotations.
Function ​_new​_annotation​_type Undocumented
Function ​_prepare​_annotations Undocumented
Function ​_shallow​_annotate Annotate the given ClauseElement and copy its internals so that internal objects refer to the new annotated object.
EMPTY_ANNOTATIONS =

Undocumented

Value
util.immutabledict()
annotated_classes: dict =

Undocumented

def _deep_annotate(element, annotations, exclude=None, detect_subquery_cols=False):

Deep copy the given ClauseElement, annotating each element with the given annotations dictionary.

Elements within the exclude collection will be cloned but not annotated.

def _deep_deannotate(element, values=None):
Deep copy the given element, removing annotations.
def _new_annotation_type(cls, base_cls):

Undocumented

def _prepare_annotations(target_hierarchy, base_cls):

Undocumented

def _shallow_annotate(element, annotations):

Annotate the given ClauseElement and copy its internals so that internal objects refer to the new annotated object.

Basically used to apply a "don't traverse" annotation to a selectable, without digging throughout the whole structure wasting time.