MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_select_tuple_subquery

Method test_select_tuple_subquery

test/sql/test_select.py:602–614  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

600 )
601
602 def test_select_tuple_subquery(self):
603 subq = select(
604 table1.c.name, tuple_(table1.c.myid, table1.c.name)
605 ).subquery()
606
607 stmt = select(subq.c.name)
608
609 # if we aren't fetching it, then render it
610 self.assert_compile(
611 stmt,
612 "SELECT anon_1.name FROM (SELECT mytable.name AS name, "
613 "(mytable.myid, mytable.name) AS anon_2 FROM mytable) AS anon_1",
614 )
615
616 @testing.combinations(
617 ("union_all", "UNION ALL"),

Callers

nothing calls this directly

Calls 4

selectFunction · 0.90
tuple_Function · 0.90
assert_compileMethod · 0.80
subqueryMethod · 0.45

Tested by

no test coverage detected