MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / lateral

Function lateral

lib/sqlalchemy/sql/_selectable_constructors.py:334–355  ·  view source on GitHub ↗

Return a :class:`_expression.Lateral` object. :class:`_expression.Lateral` is an :class:`_expression.Alias` subclass that represents a subquery with the LATERAL keyword applied to it. The special behavior of a LATERAL subquery is that it appears in the FROM clause of an enclosi

(
    selectable: Union[SelectBase, _FromClauseArgument],
    name: Optional[str] = None,
)

Source from the content-addressed store, hash-verified

332
333
334def lateral(
335 selectable: Union[SelectBase, _FromClauseArgument],
336 name: Optional[str] = None,
337) -> LateralFromClause:
338 """Return a :class:`_expression.Lateral` object.
339
340 :class:`_expression.Lateral` is an :class:`_expression.Alias`
341 subclass that represents
342 a subquery with the LATERAL keyword applied to it.
343
344 The special behavior of a LATERAL subquery is that it appears in the
345 FROM clause of an enclosing SELECT, but may correlate to other
346 FROM clauses of that SELECT. It is a special case of subquery
347 only supported by a small number of backends, currently more recent
348 PostgreSQL versions.
349
350 .. seealso::
351
352 :ref:`tutorial_lateral_correlation` - overview of usage.
353
354 """
355 return Lateral._factory(selectable, name=name)
356
357
358def outerjoin(

Callers 7

test_standaloneMethod · 0.90
test_plain_joinMethod · 0.90
test_from_functionMethod · 0.90
test_from_functionMethod · 0.90

Calls 1

_factoryMethod · 0.45

Tested by 7

test_standaloneMethod · 0.72
test_plain_joinMethod · 0.72
test_from_functionMethod · 0.72
test_from_functionMethod · 0.72