MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _label_reference

Class _label_reference

lib/sqlalchemy/sql/elements.py:3843–3870  ·  view source on GitHub ↗

Wrap a column expression as it appears in a 'reference' context. This expression is any that includes an _order_by_label_element, which is a Label, or a DESC / ASC construct wrapping a Label. The production of _label_reference() should occur when an expression is added to this cont

Source from the content-addressed store, hash-verified

3841
3842
3843class _label_reference(ColumnElement[_T]):
3844 """Wrap a column expression as it appears in a 'reference' context.
3845
3846 This expression is any that includes an _order_by_label_element,
3847 which is a Label, or a DESC / ASC construct wrapping a Label.
3848
3849 The production of _label_reference() should occur when an expression
3850 is added to this context; this includes the ORDER BY or GROUP BY of a
3851 SELECT statement, as well as a few other places, such as the ORDER BY
3852 within an OVER clause.
3853
3854 """
3855
3856 __visit_name__ = "label_reference"
3857
3858 _traverse_internals: _TraverseInternalsType = [
3859 ("element", InternalTraversal.dp_clauseelement)
3860 ]
3861
3862 element: ColumnElement[_T]
3863
3864 def __init__(self, element: ColumnElement[_T]):
3865 self.element = element
3866 self._propagate_attrs = element._propagate_attrs
3867
3868 @util.ro_non_memoized_property
3869 def _from_objects(self) -> List[FromClause]:
3870 return []
3871
3872
3873class _textual_label_reference(ColumnElement[Any]):

Callers 2

CoreFixturesClass · 0.90
as_referenceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected