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

Method test_multi_bundle_future

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

Source from the content-addressed store, hash-verified

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