|
14 | 14 | import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver;
|
15 | 15 | import org.hibernate.query.sqm.sql.SqmToSqlAstConverter;
|
16 | 16 | import org.hibernate.query.sqm.tree.SqmCopyContext;
|
| 17 | +import org.hibernate.query.sqm.tree.SqmRenderContext; |
17 | 18 | import org.hibernate.query.sqm.tree.SqmTypedNode;
|
18 | 19 | import org.hibernate.query.sqm.tree.expression.SqmDistinct;
|
19 | 20 | import org.hibernate.query.sqm.tree.expression.SqmOrderedSetAggregateFunction;
|
@@ -133,39 +134,39 @@ public SqmOrderByClause getWithinGroup() {
|
133 | 134 | }
|
134 | 135 |
|
135 | 136 | @Override
|
136 |
| - public void appendHqlString(StringBuilder hql) { |
| 137 | + public void appendHqlString(StringBuilder hql, SqmRenderContext context) { |
137 | 138 | final List<? extends SqmTypedNode<?>> arguments = getArguments();
|
138 | 139 | hql.append( getFunctionName() );
|
139 | 140 | hql.append( '(' );
|
140 | 141 | int i = 1;
|
141 | 142 | if ( arguments.get( 0 ) instanceof SqmDistinct<?> ) {
|
142 |
| - arguments.get( 0 ).appendHqlString( hql ); |
| 143 | + arguments.get( 0 ).appendHqlString( hql, context ); |
143 | 144 | if ( arguments.size() > 1 ) {
|
144 | 145 | hql.append( ' ' );
|
145 |
| - arguments.get( 1 ).appendHqlString( hql ); |
| 146 | + arguments.get( 1 ).appendHqlString( hql, context ); |
146 | 147 | i = 2;
|
147 | 148 | }
|
148 | 149 | }
|
149 | 150 | for ( ; i < arguments.size(); i++ ) {
|
150 | 151 | hql.append(", ");
|
151 |
| - arguments.get( i ).appendHqlString( hql ); |
| 152 | + arguments.get( i ).appendHqlString( hql, context ); |
152 | 153 | }
|
153 | 154 |
|
154 | 155 | hql.append( ')' );
|
155 | 156 | if ( withinGroup != null ) {
|
156 | 157 | hql.append( " within group (order by " );
|
157 | 158 | final List<SqmSortSpecification> sortSpecifications = withinGroup.getSortSpecifications();
|
158 |
| - sortSpecifications.get( 0 ).appendHqlString( hql ); |
| 159 | + sortSpecifications.get( 0 ).appendHqlString( hql, context ); |
159 | 160 | for ( int j = 1; j < sortSpecifications.size(); j++ ) {
|
160 | 161 | hql.append( ", " );
|
161 |
| - sortSpecifications.get( j ).appendHqlString( hql ); |
| 162 | + sortSpecifications.get( j ).appendHqlString( hql, context ); |
162 | 163 | }
|
163 | 164 | hql.append( ')' );
|
164 | 165 | }
|
165 | 166 |
|
166 | 167 | if ( getFilter() != null ) {
|
167 | 168 | hql.append( " filter (where " );
|
168 |
| - getFilter().appendHqlString( hql ); |
| 169 | + getFilter().appendHqlString( hql, context ); |
169 | 170 | hql.append( ')' );
|
170 | 171 | }
|
171 | 172 | }
|
|
0 commit comments