MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_select_tuple_subquery

Method test_select_tuple_subquery

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

Source from the content-addressed store, hash-verified

436 )
437
438 def test_select_tuple_subquery(self):
439 subq = select(
440 table1.c.name, tuple_(table1.c.myid, table1.c.name)
441 ).subquery()
442
443 stmt = select(subq.c.name)
444
445 # if we aren't fetching it, then render it
446 self.assert_compile(
447 stmt,
448 "SELECT anon_1.name FROM (SELECT mytable.name AS name, "
449 "(mytable.myid, mytable.name) AS anon_2 FROM mytable) AS anon_1",
450 )
451
452 @testing.combinations(
453 ("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