MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_multi_bundle_future

Method test_multi_bundle_future

test/orm/test_bundle.py:373–400  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

371 )
372
373 def test_multi_bundle_future(self):
374 Data = self.classes.Data
375 Other = self.classes.Other
376
377 d1 = aliased(Data)
378
379 b1 = Bundle("b1", d1.d1, d1.d2)
380 b2 = Bundle("b2", Data.d1, Other.o1)
381
382 sess = Session(testing.db, future=True)
383
384 stmt = (
385 select(b1, b2)
386 .join(Data.others)
387 .join(d1, d1.id == Data.id)
388 .filter(b1.c.d1 == "d3d1")
389 )
390
391 eq_(
392 sess.execute(stmt).all(),
393 [
394 (("d3d1", "d3d2"), ("d3d1", "d3o0")),
395 (("d3d1", "d3d2"), ("d3d1", "d3o1")),
396 (("d3d1", "d3d2"), ("d3d1", "d3o2")),
397 (("d3d1", "d3d2"), ("d3d1", "d3o3")),
398 (("d3d1", "d3d2"), ("d3d1", "d3o4")),
399 ],
400 )
401
402 def test_single_entity_legacy_query(self):
403 Data = self.classes.Data

Callers

nothing calls this directly

Calls 9

executeMethod · 0.95
aliasedFunction · 0.90
BundleClass · 0.90
SessionClass · 0.90
selectFunction · 0.90
eq_Function · 0.90
filterMethod · 0.45
joinMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected