| 101 | |
| 102 | |
| 103 | class 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) |
no outgoing calls