MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_select_from_implicit_subquery

Method test_select_from_implicit_subquery

test/sql/test_lateral.py:117–126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115 )
116
117 def test_select_from_implicit_subquery(self):
118 table1 = self.tables.people
119 subq = select(table1.c.people_id)
120
121 # in a FROM context, now you get "AS alias" and column labeling
122 self.assert_compile(
123 select(subq.lateral(name="alias")),
124 "SELECT alias.people_id FROM LATERAL "
125 "(SELECT people.people_id AS people_id FROM people) AS alias",
126 )
127
128 def test_select_from_text_implicit_subquery(self):
129 table1 = self.tables.people

Callers

nothing calls this directly

Calls 3

selectFunction · 0.90
assert_compileMethod · 0.80
lateralMethod · 0.45

Tested by

no test coverage detected