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

Method go

test/orm/test_subquery_relations.py:2474–2512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2472 sess.expunge_all()
2473
2474 def go():
2475 d = (
2476 sess.query(Node)
2477 .filter(Node.data.in_(["n1", "n2"]))
2478 .order_by(Node.data)
2479 .all()
2480 )
2481 eq_(
2482 [
2483 Node(
2484 data="n1",
2485 children=[
2486 Node(data="n11"),
2487 Node(
2488 data="n12",
2489 children=[
2490 Node(data="n121"),
2491 Node(data="n122"),
2492 Node(data="n123"),
2493 ],
2494 ),
2495 Node(data="n13"),
2496 ],
2497 ),
2498 Node(
2499 data="n2",
2500 children=[
2501 Node(
2502 data="n21",
2503 children=[
2504 Node(data="n211"),
2505 Node(data="n212"),
2506 ],
2507 )
2508 ],
2509 ),
2510 ],
2511 d,
2512 )
2513
2514 self.assert_sql_count(testing.db, go, 4)
2515

Callers

nothing calls this directly

Calls 15

eq_Function · 0.90
undeferFunction · 0.90
defaultloadFunction · 0.90
subqueryloadFunction · 0.90
undeferMethod · 0.80
subqueryloadMethod · 0.80
NodeClass · 0.70
allMethod · 0.45
order_byMethod · 0.45
filterMethod · 0.45
queryMethod · 0.45
in_Method · 0.45

Tested by

no test coverage detected