MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / go

Method go

test/orm/test_eager_relations.py:5015–5046  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5013 session = fixture_session()
5014
5015 def go():
5016 eq_(
5017 session.query(B)
5018 .options(
5019 joinedload(B.parent_b1),
5020 joinedload(B.parent_b2),
5021 joinedload(B.parent_z),
5022 )
5023 .filter(B.id.in_([2, 8, 11]))
5024 .order_by(B.id)
5025 .all(),
5026 [
5027 B(
5028 id=2,
5029 parent_z=A(id=1),
5030 parent_b1=B(id=1),
5031 parent_b2=None,
5032 ),
5033 B(
5034 id=8,
5035 parent_z=A(id=2),
5036 parent_b1=B(id=1),
5037 parent_b2=B(id=2),
5038 ),
5039 B(
5040 id=11,
5041 parent_z=A(id=3),
5042 parent_b1=B(id=1),
5043 parent_b2=B(id=8),
5044 ),
5045 ],
5046 )
5047
5048 self.assert_sql_count(testing.db, go, 1)
5049

Callers

nothing calls this directly

Calls 10

eq_Function · 0.90
joinedloadFunction · 0.90
BClass · 0.70
AClass · 0.70
allMethod · 0.45
order_byMethod · 0.45
filterMethod · 0.45
optionsMethod · 0.45
queryMethod · 0.45
in_Method · 0.45

Tested by

no test coverage detected