module documentation

Internal implementation for declarative.
Class _​Class​Scan​Mapper​Config No class docstring; 0/10 instance variable, 0/1 class variable, 2/14 methods documented
Class _​Deferred​Mapper​Config Undocumented
Class _​Imperative​Mapper​Config Undocumented
Class _​Mapper​Config Undocumented
Function ​_add​_attribute add an attribute to an existing declarative class.
Function ​_as​_dc​_declaredattr Undocumented
Function ​_as​_declarative Undocumented
Function ​_check​_declared​_props​_nocascade Undocumented
Function ​_declarative​_constructor A simple constructor that allows initialization from kwargs.
Function ​_declared​_mapping​_info Undocumented
Function ​_del​_attribute Undocumented
Function ​_dive​_for​_cls​_manager Undocumented
Function ​_get​_immediate​_cls​_attr No summary
Function ​_is​_declarative​_props Undocumented
Function ​_mapper Undocumented
Function ​_resolve​_for​_abstract​_or​_classical Undocumented
Function ​_undefer​_column​_name Undocumented
def _add_attribute(cls, key, value):

add an attribute to an existing declarative class.

This runs through the logic to determine MapperProperty, adds it to the Mapper, adds a column to the mapped Table, etc.

@util.preload_module('sqlalchemy.orm.decl_api')
def _as_dc_declaredattr(field_metadata, sa_dataclass_metadata_key):

Undocumented

def _as_declarative(registry, cls, dict_):

Undocumented

def _check_declared_props_nocascade(obj, name, cls):

Undocumented

def _declarative_constructor(self, **kwargs):

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

def _declared_mapping_info(cls):

Undocumented

def _del_attribute(cls, key):

Undocumented

def _dive_for_cls_manager(cls):

Undocumented

def _get_immediate_cls_attr(cls, attrname, strict=False):

return an attribute of the class that is either present directly on the class, e.g. not on a superclass, or is from a superclass but this superclass is a non-mapped mixin, that is, not a descendant of the declarative base and is also not classically mapped.

This is used to detect attributes that indicate something about a mapped class independently from any mapped classes that it may inherit from.

@util.preload_module('sqlalchemy.orm.decl_api')
def _is_declarative_props(obj):

Undocumented

def _mapper(registry, cls, table, mapper_kw):

Undocumented

def _resolve_for_abstract_or_classical(cls):

Undocumented

def _undefer_column_name(key, column):

Undocumented