MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / ColumnExpressionExt

Class ColumnExpressionExt

test/sql/test_syntax_extensions.py:103–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102
103class ColumnExpressionExt(SyntaxExtension, ClauseElement):
104 _traverse_internals: _TraverseInternalsType = [
105 ("_exprs", InternalTraversal.dp_clauseelement_tuple),
106 ]
107
108 def __init__(self, *exprs):
109 self._exprs = tuple(
110 coercions.expect(roles.ByOfRole, e, apply_propagate_attrs=self)
111 for e in exprs
112 )
113
114 def apply_to_select(self, select_stmt):
115 select_stmt.apply_syntax_extension_point(
116 lambda existing: [*existing, self],
117 "post_select",
118 )
119
120
121@compiles(PostSelectClause)

Callers 3

test_renderMethod · 0.85
test_adaptationMethod · 0.85
test_compareMethod · 0.85

Calls

no outgoing calls

Tested by 3

test_renderMethod · 0.68
test_adaptationMethod · 0.68
test_compareMethod · 0.68