[jOOQ/jOOQ#9882] Deprecate SQLDialect#supports(Collection<SQLDialect>)

This commit is contained in:
Knut Wannheden 2020-02-26 15:21:30 +01:00
parent 1c9f7f5a66
commit 8a006f67d5
4 changed files with 6 additions and 3 deletions

View File

@ -881,7 +881,10 @@ public enum SQLDialect {
/**
* Check whether this dialect supports any dialect from the argument
* collection.
*
* @deprecated - [#9882] - 3.14.0 - Use {@link #supportedBy(SQLDialect...)} instead
*/
@Deprecated
public final boolean supports(Collection<SQLDialect> other) {
if (other.contains(family))
return true;

View File

@ -508,7 +508,7 @@ class Function<T> extends AbstractField<T> implements
// [#531] Inline window specifications if the WINDOW clause is not supported
if (windowName != null) {
if (ctx.dialect().supports(SUPPORT_WINDOW_CLAUSE))
if (SUPPORT_WINDOW_CLAUSE.contains(ctx.dialect()))
return windowName;
QueryPartList<WindowDefinition> windows = (QueryPartList<WindowDefinition>) ctx.data(DATA_WINDOW_DEFINITIONS);

View File

@ -1504,7 +1504,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
// -------------
context.start(SELECT_WINDOW);
if (Tools.isNotEmpty(window) && context.dialect().supports(SUPPORT_WINDOW_CLAUSE)) {
if (Tools.isNotEmpty(window) && SUPPORT_WINDOW_CLAUSE.contains(context.dialect())) {
context.formatSeparator()
.visit(K_WINDOW)
.sql(' ')

View File

@ -92,7 +92,7 @@ final class WindowDefinitionImpl extends AbstractQueryPart implements WindowDefi
// Outside the WINDOW clause, only few dialects actually support
// referencing WINDOW definitions
else if (ctx.dialect().supports(SUPPORT_WINDOW_CLAUSE)) {
else if (SUPPORT_WINDOW_CLAUSE.contains(ctx.dialect())) {
ctx.visit(name);
}