MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / as_reference

Method as_reference

lib/sqlalchemy/sql/elements.py:5238–5246  ·  view source on GitHub ↗

refer to this labeled expression in a clause such as GROUP BY, ORDER BY etc. as the label name itself, without expanding into the full expression. .. versionadded:: 2.1

(self)

Source from the content-addressed store, hash-verified

5236 return self
5237
5238 def as_reference(self) -> _label_reference[_T]:
5239 """refer to this labeled expression in a clause such as GROUP BY,
5240 ORDER BY etc. as the label name itself, without expanding
5241 into the full expression.
5242
5243 .. versionadded:: 2.1
5244
5245 """
5246 return _label_reference(self)
5247
5248 @HasMemoized.memoized_attribute
5249 def element(self) -> ColumnElement[_T]:

Callers 2

test_query_twoMethod · 0.80
test_propagate_attrsMethod · 0.80

Calls 1

_label_referenceClass · 0.85

Tested by 2

test_query_twoMethod · 0.64
test_propagate_attrsMethod · 0.64