MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _CompileLabel

Class _CompileLabel

lib/sqlalchemy/sql/compiler.py:1027–1049  ·  view source on GitHub ↗

lightweight label object which acts as an expression.Label.

Source from the content-addressed store, hash-verified

1025# this was a Visitable, but to allow accurate detection of
1026# column elements this is actually a column element
1027class _CompileLabel(
1028 roles.BinaryElementRole[Any], elements.CompilerColumnElement
1029):
1030 """lightweight label object which acts as an expression.Label."""
1031
1032 __visit_name__ = "label"
1033 __slots__ = "element", "name", "_alt_names"
1034
1035 def __init__(self, col, name, alt_names=()):
1036 self.element = col
1037 self.name = name
1038 self._alt_names = (col,) + alt_names
1039
1040 @property
1041 def proxy_set(self):
1042 return self.element.proxy_set
1043
1044 @property
1045 def type(self):
1046 return self.element.type
1047
1048 def self_group(self, **kw):
1049 return self
1050
1051
1052class aggregate_orderby_inline(

Callers 1

_label_select_columnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected