MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _from_selectable

Method _from_selectable

lib/sqlalchemy/orm/query.py:1399–1423  ·  view source on GitHub ↗
(
        self, fromclause: FromClause, set_entity_from: bool = True
    )

Source from the content-addressed store, hash-verified

1397
1398 @_generative
1399 def _from_selectable(
1400 self, fromclause: FromClause, set_entity_from: bool = True
1401 ) -> Self:
1402 for attr in (
1403 "_where_criteria",
1404 "_order_by_clauses",
1405 "_group_by_clauses",
1406 "_limit_clause",
1407 "_offset_clause",
1408 "_last_joined_entity",
1409 "_setup_joins",
1410 "_memoized_select_entities",
1411 "_distinct",
1412 "_distinct_on",
1413 "_having_criteria",
1414 "_prefixes",
1415 "_suffixes",
1416 ):
1417 self.__dict__.pop(attr, None)
1418 self._set_select_from([fromclause], set_entity_from)
1419 self._compile_options += {
1420 "_enable_single_crit": False,
1421 }
1422
1423 return self
1424
1425 @util.deprecated(
1426 "1.4",

Callers 2

_legacy_from_selfMethod · 0.95
_set_opMethod · 0.95

Calls 2

_set_select_fromMethod · 0.95
popMethod · 0.45

Tested by

no test coverage detected