MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _from_selectable

Method _from_selectable

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

Source from the content-addressed store, hash-verified

1409
1410 @_generative
1411 def _from_selectable(
1412 self, fromclause: FromClause, set_entity_from: bool = True
1413 ) -> Self:
1414 for attr in (
1415 "_where_criteria",
1416 "_order_by_clauses",
1417 "_group_by_clauses",
1418 "_limit_clause",
1419 "_offset_clause",
1420 "_last_joined_entity",
1421 "_setup_joins",
1422 "_memoized_select_entities",
1423 "_distinct",
1424 "_distinct_on",
1425 "_having_criteria",
1426 "_prefixes",
1427 "_suffixes",
1428 "_syntax_extensions",
1429 ):
1430 self.__dict__.pop(attr, None)
1431 self._set_select_from([fromclause], set_entity_from)
1432 self._compile_options += {
1433 "_enable_single_crit": False,
1434 }
1435
1436 return self
1437
1438 @util.deprecated(
1439 "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