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

Method test_from_function

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

Source from the content-addressed store, hash-verified

321 )
322
323 def test_from_function(self):
324 bookcases = self.tables.bookcases
325 srf = lateral(func.generate_series(1, bookcases.c.bookcase_shelves))
326
327 self.assert_compile(
328 select(bookcases).select_from(bookcases.join(srf, true())),
329 "SELECT bookcases.bookcase_id, bookcases.bookcase_owner_id, "
330 "bookcases.bookcase_shelves, bookcases.bookcase_width "
331 "FROM bookcases JOIN "
332 "LATERAL generate_series(:generate_series_1, "
333 "bookcases.bookcase_shelves) AS anon_1 ON true",
334 )
335
336 def test_no_alias_construct(self):
337 a = table("a", column("x"))

Callers

nothing calls this directly

Calls 6

lateralFunction · 0.90
selectFunction · 0.90
trueFunction · 0.90
assert_compileMethod · 0.80
select_fromMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected