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

Method test_select_from

test/orm/test_query.py:6454–6471  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6452 with_parent(u1, User.name)
6453
6454 def test_select_from(self):
6455 User, Address = self.classes.User, self.classes.Address
6456
6457 sess = fixture_session()
6458 u1 = sess.get(User, 7)
6459 q = (
6460 sess.query(Address)
6461 .select_from(Address)
6462 .filter(with_parent(u1, User.addresses))
6463 )
6464 self.assert_compile(
6465 q,
6466 "SELECT addresses.id AS addresses_id, "
6467 "addresses.user_id AS addresses_user_id, "
6468 "addresses.email_address AS addresses_email_address "
6469 "FROM addresses WHERE :param_1 = addresses.user_id",
6470 {"param_1": 7},
6471 )
6472
6473 def test_from_entity_standalone_fn(self):
6474 User, Address = self.classes.User, self.classes.Address

Callers

nothing calls this directly

Calls 7

fixture_sessionFunction · 0.90
with_parentFunction · 0.90
assert_compileMethod · 0.80
getMethod · 0.45
filterMethod · 0.45
select_fromMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected