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

Method test_alias_of_lateral

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

Source from the content-addressed store, hash-verified

102 )
103
104 def test_alias_of_lateral(self):
105 table1 = self.tables.people
106 subq = select(table1.c.people_id).subquery()
107
108 # this use case wasn't working until we changed the name of the
109 # "lateral" name to "lateral_" in compiler.visit_lateral(), was
110 # conflicting with the kwarg before
111 self.assert_compile(
112 select(subq.lateral().alias(name="alias")),
113 "SELECT alias.people_id FROM LATERAL "
114 "(SELECT people.people_id AS people_id FROM people) AS alias",
115 )
116
117 def test_select_from_implicit_subquery(self):
118 table1 = self.tables.people

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected