MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / ColumnProperty

Class ColumnProperty

lib/sqlalchemy/orm/properties.py:102–495  ·  view source on GitHub ↗

Describes an object attribute that corresponds to a table column or other column expression. Public constructor is the :func:`_orm.column_property` function.

Source from the content-addressed store, hash-verified

100
101@log.class_logger
102class ColumnProperty(
103 _DataclassDefaultsDontSet,
104 _MapsColumns[_T],
105 StrategizedProperty[_T],
106 _IntrospectsAnnotations,
107 log.Identified,
108):
109 """Describes an object attribute that corresponds to a table column
110 or other column expression.
111
112 Public constructor is the :func:`_orm.column_property` function.
113
114 """
115
116 strategy_wildcard_key = strategy_options._COLUMN_TOKEN
117 inherit_cache = True
118 """:meta private:"""
119
120 _links_to_entity = False
121
122 columns: List[NamedColumn[Any]]
123
124 _is_polymorphic_discriminator: bool
125
126 _mapped_by_synonym: Optional[str]
127
128 comparator_factory: Type[PropComparator[_T]]
129
130 __slots__ = (
131 "columns",
132 "group",
133 "deferred",
134 "instrument",
135 "comparator_factory",
136 "active_history",
137 "expire_on_flush",
138 "_default_scalar_value",
139 "_creation_order",
140 "_is_polymorphic_discriminator",
141 "_mapped_by_synonym",
142 "_deferred_column_loader",
143 "_raise_column_loader",
144 "_renders_in_subqueries",
145 "raiseload",
146 )
147
148 def __init__(
149 self,
150 column: _ORMColumnExprArgument[_T],
151 *additional_columns: _ORMColumnExprArgument[Any],
152 attribute_options: Optional[_AttributeOptions] = None,
153 group: Optional[str] = None,
154 deferred: bool = False,
155 raiseload: bool = False,
156 comparator_factory: Optional[Type[PropComparator[_T]]] = None,
157 active_history: bool = False,
158 default_scalar_value: Any = None,
159 expire_on_flush: bool = True,

Callers 2

copyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected