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

Method test_standalone_implicit_subquery

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

Source from the content-addressed store, hash-verified

75 )
76
77 def test_standalone_implicit_subquery(self):
78 table1 = self.tables.people
79 subq = select(table1.c.people_id)
80
81 # alias name is not rendered because subquery is not
82 # in the context of a FROM clause
83 self.assert_compile(
84 lateral(subq, name="alias"),
85 "LATERAL (SELECT people.people_id FROM people)",
86 )
87
88 self.assert_compile(
89 subq.lateral(name="alias"),
90 "LATERAL (SELECT people.people_id FROM people)",
91 )
92
93 def test_select_from(self):
94 table1 = self.tables.people

Callers

nothing calls this directly

Calls 4

selectFunction · 0.90
lateralFunction · 0.90
assert_compileMethod · 0.80
lateralMethod · 0.45

Tested by

no test coverage detected