MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / query

Method query

test/orm/test_lambdas.py:101–108  ·  view source on GitHub ↗
(names)

Source from the content-addressed store, hash-verified

99 # note this does a traversal + _clone of the InstrumentedAttribute
100 # for the first time ever
101 def query(names):
102 stmt = lambda_stmt(
103 lambda: select(User.name, Address.email_address)
104 .where(User.name.in_(names))
105 .join(User.addresses)
106 ) + (lambda s: s.order_by(User.id, Address.id))
107
108 return s.execute(stmt)
109
110 def go1():
111 r1 = query(["ed"])

Callers 1

Calls 13

lambda_stmtFunction · 0.90
selectinloadFunction · 0.90
aliasedFunction · 0.90
subqueryloadFunction · 0.90
selectFunction · 0.85
FooClass · 0.70
joinMethod · 0.45
whereMethod · 0.45
in_Method · 0.45
order_byMethod · 0.45
executeMethod · 0.45
add_criteriaMethod · 0.45

Tested by

no test coverage detected