[jOOQ/jOOQ#9186] Fix various @Support annotations for MariaDB

Also fix implementation in `JsonEntryImpl` for MariaDB.
This commit is contained in:
Knut Wannheden 2019-09-10 13:28:59 +02:00
parent 99523abbfe
commit f58ae584cd
7 changed files with 63 additions and 60 deletions

View File

@ -300,7 +300,7 @@ public interface AlterTableStep {
* <p>
* This is an alias for {@link #addColumnIfNotExists(Field)}.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
AlterTableFinalStep addIfNotExists(Field<?> field);
/**
@ -309,7 +309,7 @@ public interface AlterTableStep {
* <p>
* This is an alias for {@link #addColumnIfNotExists(Field, DataType)}.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
<T> AlterTableFinalStep addIfNotExists(Field<T> field, DataType<T> type);
/**
@ -318,7 +318,7 @@ public interface AlterTableStep {
* <p>
* This is an alias for {@link #addColumnIfNotExists(Name, DataType)}.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
AlterTableFinalStep addIfNotExists(Name field, DataType<?> type);
/**
@ -327,7 +327,7 @@ public interface AlterTableStep {
* <p>
* This is an alias for {@link #addColumnIfNotExists(String, DataType)}.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
AlterTableFinalStep addIfNotExists(String field, DataType<?> type);
/**
@ -362,28 +362,28 @@ public interface AlterTableStep {
* Add an <code>ADD COLUMN IF NOT EXISTS</code> clause to the <code>ALTER TABLE</code>
* statement.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
AlterTableFinalStep addColumnIfNotExists(Field<?> field);
/**
* Add an <code>ADD COLUMN IF NOT EXISTS</code> clause to the <code>ALTER TABLE</code>
* statement.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
<T> AlterTableFinalStep addColumnIfNotExists(Field<T> field, DataType<T> type);
/**
* Add an <code>ADD COLUMN IF NOT EXISTS</code> clause to the <code>ALTER TABLE</code>
* statement.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
AlterTableFinalStep addColumnIfNotExists(Name field, DataType<?> type);
/**
* Add an <code>ADD COLUMN IF NOT EXISTS</code> clause to the <code>ALTER TABLE</code>
* statement.
*/
@Support({ H2, POSTGRES })
@Support({ H2, MARIADB, POSTGRES })
AlterTableFinalStep addColumnIfNotExists(String field, DataType<?> type);
/**

View File

@ -49,6 +49,7 @@ import static org.jooq.SQLDialect.H2;
import static org.jooq.SQLDialect.HSQLDB;
// ...
// ...
import static org.jooq.SQLDialect.MARIADB;
// ...
import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.SQLITE;
@ -540,6 +541,6 @@ public interface ConstraintTypeStep extends ConstraintFinalStep {
/**
* Create a <code>CHECK</code> constraint.
*/
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES, SQLITE })
ConstraintFinalStep check(Condition condition);
}

View File

@ -372,7 +372,7 @@ public interface DSLContext extends Scope , AutoCloseable {
* Run an <code>EXPLAIN</code> statement in the database to estimate the
* cardinality of the query.
*/
@Support({ H2, HSQLDB, MYSQL, POSTGRES, SQLITE })
@Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
Explain explain(Query query);
// -------------------------------------------------------------------------
@ -8562,7 +8562,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#commentOnColumn(Name)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES })
CommentOnIsStep commentOnColumn(Name columnName);
/**
@ -8570,7 +8570,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#commentOnColumn(Field)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES })
CommentOnIsStep commentOnColumn(Field<?> field);
/**
@ -8820,7 +8820,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(String view, String... fields);
/**
@ -8828,7 +8828,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(Name, Name...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(Name view, Name... fields);
/**
@ -8836,7 +8836,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(Table, Field...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(Table<?> view, Field<?>... fields);
@ -8849,7 +8849,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(String view, Function<? super Field<?>, ? extends String> fieldNameFunction);
/**
@ -8861,7 +8861,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(String view, BiFunction<? super Field<?>, ? super Integer, ? extends String> fieldNameFunction);
/**
@ -8873,7 +8873,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(Name view, Function<? super Field<?>, ? extends Name> fieldNameFunction);
/**
@ -8885,7 +8885,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(Name view, BiFunction<? super Field<?>, ? super Integer, ? extends Name> fieldNameFunction);
/**
@ -8897,7 +8897,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(Table<?> view, Function<? super Field<?>, ? extends Field<?>> fieldNameFunction);
/**
@ -8909,7 +8909,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
CreateViewAsStep<Record> createOrReplaceView(Table<?> view, BiFunction<? super Field<?>, ? super Integer, ? extends Field<?>> fieldNameFunction);
@ -9144,7 +9144,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createIndexIfNotExists(String)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES, SQLITE })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES, SQLITE })
CreateIndexStep createIndexIfNotExists(String index);
/**
@ -9152,7 +9152,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createIndexIfNotExists(Name)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES, SQLITE })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES, SQLITE })
CreateIndexStep createIndexIfNotExists(Name index);
/**
@ -9160,7 +9160,7 @@ public interface DSLContext extends Scope , AutoCloseable {
*
* @see DSL#createIndexIfNotExists(Index)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES, SQLITE })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES, SQLITE })
CreateIndexStep createIndexIfNotExists(Index index);
/**

View File

@ -41,6 +41,7 @@ package org.jooq;
import static org.jooq.SQLDialect.CUBRID;
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.SQLDialect.H2;
import static org.jooq.SQLDialect.MARIADB;
// ...
import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.SQLITE;
@ -92,7 +93,7 @@ public interface InsertOnConflictWhereStep<R extends Record> extends InsertRetur
* Add a <code>WHERE</code> clause to the <code>INSERT</code> statement's
* <code>ON DUPLICATE KEY UPDATE</code> or <code>ON CONFLICT ... DO UPDATE</code> clause.
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
InsertOnConflictConditionStep<R> where(Condition condition);
/**
@ -100,7 +101,7 @@ public interface InsertOnConflictWhereStep<R extends Record> extends InsertRetur
* <code>ON DUPLICATE KEY UPDATE</code> or <code>ON CONFLICT ... DO UPDATE</code> clause,
* connecting them with each other using {@link Operator#AND}.
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
InsertOnConflictConditionStep<R> where(Condition... conditions);
/**
@ -108,14 +109,14 @@ public interface InsertOnConflictWhereStep<R extends Record> extends InsertRetur
* <code>ON DUPLICATE KEY UPDATE</code> or <code>ON CONFLICT ... DO UPDATE</code> clause,
* connecting them with each other using {@link Operator#AND}.
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
InsertOnConflictConditionStep<R> where(Collection<? extends Condition> conditions);
/**
* Add a <code>WHERE</code> clause to the <code>INSERT</code> statement's
* <code>ON DUPLICATE KEY UPDATE</code> or <code>ON CONFLICT ... DO UPDATE</code> clause.
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
InsertOnConflictConditionStep<R> where(Field<Boolean> field);
/**
@ -130,7 +131,7 @@ public interface InsertOnConflictWhereStep<R extends Record> extends InsertRetur
* @see DSL#condition(SQL)
* @see SQL
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
@PlainSQL
InsertOnConflictConditionStep<R> where(SQL sql);
@ -146,7 +147,7 @@ public interface InsertOnConflictWhereStep<R extends Record> extends InsertRetur
* @see DSL#condition(String)
* @see SQL
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
@PlainSQL
InsertOnConflictConditionStep<R> where(String sql);
@ -163,7 +164,7 @@ public interface InsertOnConflictWhereStep<R extends Record> extends InsertRetur
* @see DSL#sql(String, Object...)
* @see SQL
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
@PlainSQL
InsertOnConflictConditionStep<R> where(String sql, Object... bindings);
@ -180,7 +181,7 @@ public interface InsertOnConflictWhereStep<R extends Record> extends InsertRetur
* @see DSL#sql(String, QueryPart...)
* @see SQL
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
@PlainSQL
InsertOnConflictConditionStep<R> where(String sql, QueryPart... parts);

View File

@ -265,7 +265,7 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
*
* @param condition The condition
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
void addConditions(Condition condition);
/**
@ -277,7 +277,7 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
*
* @param conditions The condition
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
void addConditions(Condition... conditions);
/**
@ -289,7 +289,7 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
*
* @param conditions The condition
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
void addConditions(Collection<? extends Condition> conditions);
/**
@ -301,7 +301,7 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
*
* @param condition The condition
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
void addConditions(Operator operator, Condition condition);
/**
@ -313,7 +313,7 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
*
* @param conditions The condition
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
void addConditions(Operator operator, Condition... conditions);
/**
@ -325,7 +325,7 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
*
* @param conditions The condition
*/
@Support({ CUBRID, DERBY, H2, POSTGRES, SQLITE })
@Support({ CUBRID, DERBY, H2, MARIADB, POSTGRES, SQLITE })
void addConditions(Operator operator, Collection<? extends Condition> conditions);
/**

View File

@ -5850,7 +5850,7 @@ public class DSL {
*
* @see DSLContext#commentOnColumn(Name)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES })
public static CommentOnIsStep commentOnColumn(Name columnName) {
return dsl().commentOnColumn(columnName);
}
@ -5860,7 +5860,7 @@ public class DSL {
*
* @see DSLContext#commentOnColumn(Field)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES })
public static CommentOnIsStep commentOnColumn(Field<?> field) {
return dsl().commentOnColumn(field);
}
@ -6829,7 +6829,7 @@ public class DSL {
*
* @see DSLContext#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
public static CreateViewAsStep createOrReplaceView(String view, String... fields) {
return dsl().createOrReplaceView(view, fields);
}
@ -6839,7 +6839,7 @@ public class DSL {
*
* @see DSLContext#createOrReplaceView(Name, Name...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
public static CreateViewAsStep createOrReplaceView(Name view, Name... fields) {
return dsl().createOrReplaceView(view, fields);
}
@ -6849,7 +6849,7 @@ public class DSL {
*
* @see DSLContext#createOrReplaceView(Table, Field...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
public static CreateViewAsStep createOrReplaceView(Table<?> view, Field<?>... fields) {
return dsl().createOrReplaceView(view, fields);
}
@ -6864,7 +6864,7 @@ public class DSL {
*
* @see DSLContext#createOrReplaceView(String, String...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
public static CreateViewAsStep createOrReplaceView(String view, Function<? super Field<?>, ? extends String> fieldNameFunction) {
return dsl().createOrReplaceView(view, fieldNameFunction);
}
@ -6878,7 +6878,7 @@ public class DSL {
*
* @see DSLContext#createOrReplaceView(Name, Name...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
public static CreateViewAsStep createOrReplaceView(Name view, Function<? super Field<?>, ? extends Name> fieldNameFunction) {
return dsl().createOrReplaceView(view, fieldNameFunction);
}
@ -6892,7 +6892,7 @@ public class DSL {
*
* @see DSLContext#createOrReplaceView(Table, Field...)
*/
@Support({ H2, MYSQL, POSTGRES })
@Support({ H2, MARIADB, MYSQL, POSTGRES })
public static CreateViewAsStep createOrReplaceView(Table<?> view, Function<? super Field<?>, ? extends Field<?>> fieldNameFunction) {
return dsl().createOrReplaceView(view, fieldNameFunction);
}
@ -7137,7 +7137,7 @@ public class DSL {
*
* @see DSLContext#createIndexIfNotExists(String)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES, SQLITE })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES, SQLITE })
public static CreateIndexStep createIndexIfNotExists(String index) {
return dsl().createIndexIfNotExists(index);
}
@ -7147,7 +7147,7 @@ public class DSL {
*
* @see DSLContext#createIndexIfNotExists(Name)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES, SQLITE })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES, SQLITE })
public static CreateIndexStep createIndexIfNotExists(Name index) {
return dsl().createIndexIfNotExists(index);
}
@ -7157,7 +7157,7 @@ public class DSL {
*
* @see DSLContext#createIndexIfNotExists(Index)
*/
@Support({ FIREBIRD, H2, HSQLDB, POSTGRES, SQLITE })
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES, SQLITE })
public static CreateIndexStep createIndexIfNotExists(Index index) {
return dsl().createIndexIfNotExists(index);
}
@ -17754,7 +17754,7 @@ public class DSL {
/**
* The JSON array constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSON> jsonArray(Field<?>... fields) {
return jsonArray(Arrays.asList(fields));
}
@ -17762,7 +17762,7 @@ public class DSL {
/**
* The JSON array constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSON> jsonArray(Collection<? extends Field<?>> fields) {
return new JSONArray<>(JSON, fields);
}
@ -17770,7 +17770,7 @@ public class DSL {
/**
* The JSONB array constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSONB> jsonbArray(Field<?>... fields) {
return jsonbArray(Arrays.asList(fields));
}
@ -17778,7 +17778,7 @@ public class DSL {
/**
* The JSONB array constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSONB> jsonbArray(Collection<? extends Field<?>> fields) {
return new JSONArray<>(JSONB, fields);
}
@ -17786,7 +17786,7 @@ public class DSL {
/**
* A constructor for JSON entries to be used with {@link #jsonObject(JSONEntry...)}.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static <T> JSONEntry<T> jsonEntry(Field<String> key, Field<T> value) {
return new JSONEntryImpl<>(key, value);
}
@ -17794,7 +17794,7 @@ public class DSL {
/**
* The JSON object constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSON> jsonObject(Field<String> key, Field<?> value) {
return jsonObject(jsonEntry(key, value));
}
@ -17802,7 +17802,7 @@ public class DSL {
/**
* The JSON object constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSON> jsonObject(JSONEntry<?>... entries) {
return jsonObject(Arrays.asList(entries));
}
@ -17810,7 +17810,7 @@ public class DSL {
/**
* The JSON object constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSON> jsonObject(Collection<? extends JSONEntry<?>> entries) {
return new JSONObject<>(JSON, entries);
}
@ -17818,7 +17818,7 @@ public class DSL {
/**
* The JSONB object constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSONB> jsonbObject(JSONEntry<?>... entries) {
return jsonbObject(Arrays.asList(entries));
}
@ -17826,7 +17826,7 @@ public class DSL {
/**
* The JSONB object constructor.
*/
@Support({ MYSQL, POSTGRES })
@Support({ MARIADB, MYSQL, POSTGRES })
public static Field<JSONB> jsonbObject(Collection<? extends JSONEntry<?>> entries) {
return new JSONObject<>(JSONB, entries);
}
@ -17908,7 +17908,7 @@ public class DSL {
* {@link SQLDialect#POSTGRES} supports this as
* <code>COUNT(DISTINCT(expr1, expr2))</code>.
*/
@Support({ H2, HSQLDB, MYSQL, POSTGRES })
@Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
public static AggregateFunction<Integer> countDistinct(Field<?>... fields) {
fields = nullSafe(fields);
return fields.length == 0 ? countDistinct(asterisk()) : new org.jooq.impl.Function<>("count", true, SQLDataType.INTEGER, fields);

View File

@ -77,6 +77,7 @@ final class JSONEntryImpl<T> extends AbstractQueryPart implements JSONEntry<T> {
@Override
public void accept(Context<?> ctx) {
switch (ctx.family()) {
case MARIADB:
case MYSQL:
case POSTGRES:
ctx.visit(key).sql(", ").visit(value);