[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:
Lukas Eder 2024-05-06 11:20:24 +02:00
parent 175f908061
commit 5b315c5a6e
3 changed files with 60 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;