MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_select_from

Method test_select_from

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

Source from the content-addressed store, hash-verified

91 )
92
93 def test_select_from(self):
94 table1 = self.tables.people
95 subq = select(table1.c.people_id).subquery()
96
97 # in a FROM context, now you get "AS alias" and column labeling
98 self.assert_compile(
99 select(subq.lateral(name="alias")),
100 "SELECT alias.people_id FROM LATERAL "
101 "(SELECT people.people_id AS people_id FROM people) AS alias",
102 )
103
104 def test_alias_of_lateral(self):
105 table1 = self.tables.people

Callers

nothing calls this directly

Calls 4

selectFunction · 0.90
assert_compileMethod · 0.80
subqueryMethod · 0.45
lateralMethod · 0.45

Tested by

no test coverage detected