(self, aggregateorderby, **kwargs)
| 3038 | ) |
| 3039 | |
| 3040 | def visit_aggregateorderby(self, aggregateorderby, **kwargs): |
| 3041 | if self.dialect.aggregate_order_by_style is AggregateOrderByStyle.NONE: |
| 3042 | raise exc.CompileError( |
| 3043 | "this dialect does not support " |
| 3044 | "ORDER BY within an aggregate function" |
| 3045 | ) |
| 3046 | elif ( |
| 3047 | self.dialect.aggregate_order_by_style |
| 3048 | is AggregateOrderByStyle.INLINE |
| 3049 | ): |
| 3050 | new_fn = aggregateorderby.element._clone() |
| 3051 | new_fn.clause_expr = elements.Grouping( |
| 3052 | aggregate_orderby_inline( |
| 3053 | new_fn.clause_expr.element, aggregateorderby.order_by |
| 3054 | ) |
| 3055 | ) |
| 3056 | |
| 3057 | return new_fn._compiler_dispatch(self, **kwargs) |
| 3058 | else: |
| 3059 | return self.visit_withingroup(aggregateorderby, **kwargs) |
| 3060 | |
| 3061 | def visit_aggregate_orderby_inline(self, element, **kw): |
| 3062 | return "%s ORDER BY %s" % ( |
nothing calls this directly
no test coverage detected