[jOOQ/jOOQ#13593] transformPatternsNullOnNullInput

This includes:
- [jOOQ/jOOQ#9085] Switch default rendering of WIDTH_BUCKET
This commit is contained in:
Lukas Eder 2022-11-08 15:18:33 +01:00
parent 1e5c0786f4
commit 25725a5322
2 changed files with 26 additions and 5 deletions

View File

@ -2259,6 +2259,10 @@ package org.jooq.impl;

View File

@ -108,12 +108,25 @@ implements
case POSTGRES:
case YUGABYTEDB:
ctx.visit(N_WIDTH_BUCKET).sql('(').visit(field).sql(", ").visit(low).sql(", ").visit(high).sql(", ").visit(buckets).sql(')');
break;
default:
case CUBRID:
case DERBY:
case FIREBIRD:
case H2:
case HSQLDB:
case IGNITE:
case MARIADB:
case MYSQL:
case SQLITE:
ctx.visit(
DSL.when(field.lt(low), zero())
.when(field.ge(high), iadd(buckets, one()))
@ -126,6 +139,10 @@ implements
))
);
break;
default:
ctx.visit(N_WIDTH_BUCKET).sql('(').visit(field).sql(", ").visit(low).sql(", ").visit(high).sql(", ").visit(buckets).sql(')');
break;
}
}