[jOOQ/jOOQ#9930] Fixed ListAgg for SQL Server
This commit is contained in:
parent
aa20f07f4e
commit
c790c84d99
@ -125,7 +125,7 @@ class DefaultAggregateFunction<T> extends AbstractAggregateFunction<T> {
|
||||
/**
|
||||
* Render <code>WITHIN GROUP (ORDER BY ..)</code> clause
|
||||
*/
|
||||
private final void acceptWithinGroupClause(Context<?> ctx) {
|
||||
final void acceptWithinGroupClause(Context<?> ctx) {
|
||||
if (withinGroupOrderBy != null) {
|
||||
ctx.sql(' ').visit(K_WITHIN_GROUP)
|
||||
.sql(" (").visit(K_ORDER_BY).sql(' ');
|
||||
|
||||
@ -51,6 +51,7 @@ import static org.jooq.SQLDialect.POSTGRES;
|
||||
import static org.jooq.SQLDialect.SQLITE;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.impl.Keywords.F_CONCAT;
|
||||
import static org.jooq.impl.Keywords.F_SUBSTR;
|
||||
import static org.jooq.impl.Keywords.F_XMLAGG;
|
||||
@ -110,6 +111,10 @@ final class ListAgg extends DefaultAggregateFunction<String> {
|
||||
else if (SUPPORT_STRING_AGG.contains(ctx.dialect())) {
|
||||
acceptStringAgg(ctx);
|
||||
acceptFilterClause(ctx);
|
||||
|
||||
|
||||
|
||||
|
||||
acceptOverClause(ctx);
|
||||
}
|
||||
|
||||
@ -169,6 +174,9 @@ final class ListAgg extends DefaultAggregateFunction<String> {
|
||||
else
|
||||
ctx.sql(", ''");
|
||||
|
||||
|
||||
|
||||
|
||||
acceptOrderBy(ctx);
|
||||
ctx.sql(')');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user