[jOOQ/jOOQ#9110] Fix rendering for countDistinct()
When calling `DSL#countDistinct(Field...)` with an empty array (as in `countDistinct()`) the rendering is the same as for `countDistinct(asterisk())`: `COUNT(DISTINCT *)`.
This commit is contained in:
parent
a3f25af543
commit
e046ece89c
@ -17865,7 +17865,8 @@ public class DSL {
|
||||
*/
|
||||
@Support({ H2, HSQLDB, MYSQL, POSTGRES })
|
||||
public static AggregateFunction<Integer> countDistinct(Field<?>... fields) {
|
||||
return new org.jooq.impl.Function<>("count", true, SQLDataType.INTEGER, nullSafe(fields));
|
||||
fields = nullSafe(fields);
|
||||
return fields.length == 0 ? countDistinct(asterisk()) : new org.jooq.impl.Function<>("count", true, SQLDataType.INTEGER, fields);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user