MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _anon_name_label

Method _anon_name_label

lib/sqlalchemy/sql/elements.py:1826–1844  ·  view source on GitHub ↗

Provides a constant 'anonymous label' for this ColumnElement. This is a label() expression which will be named at compile time. The same label() is returned each time ``anon_label`` is called so that expressions can reference ``anon_label`` multiple times, producing

(self)

Source from the content-addressed store, hash-verified

1824
1825 @util.memoized_property
1826 def _anon_name_label(self) -> str:
1827 """Provides a constant 'anonymous label' for this ColumnElement.
1828
1829 This is a label() expression which will be named at compile time.
1830 The same label() is returned each time ``anon_label`` is called so
1831 that expressions can reference ``anon_label`` multiple times,
1832 producing the same label name at compile time.
1833
1834 The compiler uses this function automatically at compile time
1835 for expressions that are known to be 'unnamed' like binary
1836 expressions and function calls.
1837
1838 .. versionchanged:: 1.4.9 - this attribute was not intended to be
1839 public and is renamed to _anon_name_label. anon_name exists
1840 for backwards compat
1841
1842 """
1843 name = getattr(self, "name", None)
1844 return self._anon_label(name)
1845
1846 @util.memoized_property
1847 def _anon_key_label(self) -> _anonymous_label:

Callers

nothing calls this directly

Calls 1

_anon_labelMethod · 0.95

Tested by

no test coverage detected