[jOOQ/jOOQ#12916] Select.(), , (), (), () don't actually return null in the absence of a predicate
This commit is contained in:
parent
4a1db22f86
commit
7c4d467a5c
@ -55,6 +55,9 @@ import org.jooq.SQL;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.impl.QOM.UProxy;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@ -67,6 +70,12 @@ final class ConditionProviderImpl extends AbstractQueryPart implements Condition
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
final Condition getWhereOrNull() {
|
||||
return hasWhere() ? condition : null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
final Condition getWhere() {
|
||||
return hasWhere() ? condition : noCondition();
|
||||
}
|
||||
|
||||
@ -4489,7 +4489,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
|
||||
@Override
|
||||
public final Condition $where() {
|
||||
return condition;
|
||||
return condition.getWhereOrNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -4528,7 +4528,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
|
||||
@Override
|
||||
public final Condition $having() {
|
||||
return having;
|
||||
return having.getWhereOrNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -4554,7 +4554,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
|
||||
@Override
|
||||
public final Condition $qualify() {
|
||||
return qualify;
|
||||
return qualify.getWhereOrNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user