MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/orm/context.py:3251–3285  ·  view source on GitHub ↗
(
        self,
        compile_state,
        column,
        entities_collection,
        raw_column_index,
        is_current_entities,
        parent_bundle=None,
    )

Source from the content-addressed store, hash-verified

3249 )
3250
3251 def __init__(
3252 self,
3253 compile_state,
3254 column,
3255 entities_collection,
3256 raw_column_index,
3257 is_current_entities,
3258 parent_bundle=None,
3259 ):
3260 self.expr = column
3261 self.raw_column_index = raw_column_index
3262 self.translate_raw_column = raw_column_index is not None
3263
3264 if column._is_star:
3265 compile_state.compile_options += {"_is_star": True}
3266
3267 if not is_current_entities or column._is_text_clause:
3268 self._label_name = None
3269 else:
3270 if parent_bundle:
3271 self._label_name = column._proxy_key
3272 else:
3273 self._label_name = compile_state._label_convention(column)
3274
3275 if parent_bundle:
3276 parent_bundle._entities.append(self)
3277 else:
3278 entities_collection.append(self)
3279
3280 self.column = column
3281 self.entity_zero_or_selectable = (
3282 self.column._from_objects[0] if self.column._from_objects else None
3283 )
3284 self._extra_entities = (self.expr, self.column)
3285 self._fetch_column = self._row_processor = None
3286
3287 def corresponds_to(self, entity):
3288 return False

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected