[jOOQ/jOOQ#16071] Support MIN_BY() and MAX_BY() in HANA
They're just FIRST_VALUE() and LAST_VALUE(), really...
This commit is contained in:
parent
175f908061
commit
5b315c5a6e
@ -355,7 +355,11 @@ implements
|
||||
}
|
||||
|
||||
final void acceptOrderBy(Context<?> ctx) {
|
||||
if (!Tools.isEmpty(withinGroupOrderBy)) {
|
||||
acceptOrderBy(ctx, withinGroupOrderBy);
|
||||
}
|
||||
|
||||
static final void acceptOrderBy(Context<?> ctx, SortFieldList orderBy) {
|
||||
if (!Tools.isEmpty(orderBy)) {
|
||||
switch (ctx.family()) {
|
||||
|
||||
|
||||
@ -364,7 +368,7 @@ implements
|
||||
|
||||
|
||||
default:
|
||||
ctx.sql(' ').visit(K_ORDER_BY).sql(' ').visit(withinGroupOrderBy);
|
||||
ctx.sql(' ').visit(K_ORDER_BY).sql(' ').visit(orderBy);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,6 +115,27 @@ implements
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case H2:
|
||||
case HSQLDB:
|
||||
case POSTGRES:
|
||||
@ -149,6 +170,12 @@ implements
|
||||
ctx.visit(N_argMax);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
super.acceptFunctionName(ctx);
|
||||
break;
|
||||
|
||||
@ -115,6 +115,27 @@ implements
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case H2:
|
||||
case HSQLDB:
|
||||
case POSTGRES:
|
||||
@ -149,6 +170,12 @@ implements
|
||||
ctx.visit(N_argMin);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
super.acceptFunctionName(ctx);
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user