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

Method go

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

Source from the content-addressed store, hash-verified

115 stmt = select(User).where(User.id == 7)
116
117 def go():
118 if legacy:
119 ret = (
120 sess.query(User)
121 .from_statement(stmt)
122 .options(joinedload(User.addresses))
123 .all()
124 )
125 else:
126 ret = sess.scalars(
127 select(User)
128 .from_statement(stmt)
129 .options(joinedload(User.addresses))
130 ).all()
131
132 eq_(self.static.user_address_result[0:1], ret)
133
134 # joinedload can't be applied here so this necessarily
135 # has to lazy load the addresses

Callers

nothing calls this directly

Calls 15

joinedloadFunction · 0.90
selectFunction · 0.90
eq_Function · 0.90
contains_eagerFunction · 0.90
aliasedFunction · 0.90
is_notFunction · 0.90
is_Function · 0.90
lazyloadFunction · 0.90
UserClass · 0.70
AddressClass · 0.70
DingalingClass · 0.70
OrderClass · 0.70

Tested by

no test coverage detected