[jOOQ/jOOQ#9104] Fix missing parenthesis regression in OSS edition
In commit jOOQ/jOOQ@a55a362fd8 the SQL rendering logic for parenthesis pairs in `QuantifiedSelectImpl` and `RowSubqueryCondition` was inadvertently broken.
This commit is contained in:
parent
4c54d82a7e
commit
2fb28a8956
@ -95,13 +95,9 @@ final class QuantifiedSelectImpl<R extends Record> extends AbstractQueryPart imp
|
||||
|
||||
ctx.visit(quantifier.toKeyword());
|
||||
|
||||
boolean extraParentheses = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.sql(extraParentheses ? " ((" : " (");
|
||||
|
||||
ctx.subquery(true)
|
||||
.formatIndentStart()
|
||||
@ -111,9 +107,7 @@ final class QuantifiedSelectImpl<R extends Record> extends AbstractQueryPart imp
|
||||
.formatNewLine()
|
||||
.subquery(false);
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.sql(extraParentheses ? "))" : ")");
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
|
||||
@ -220,10 +220,10 @@ final class RowSubqueryCondition extends AbstractCondition {
|
||||
|
||||
if (rightQuantified == null) {
|
||||
|
||||
// Some databases need extra parentheses around the RHS
|
||||
boolean extraParentheses = false;
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.sql(extraParentheses ? "((" : "(");
|
||||
|
||||
|
||||
|
||||
@ -239,7 +239,7 @@ final class RowSubqueryCondition extends AbstractCondition {
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.sql(extraParentheses ? "))" : ")");
|
||||
}
|
||||
|
||||
// [#2054] Quantified row value expression comparison predicates shouldn't have parentheses before ANY or ALL
|
||||
|
||||
Loading…
Reference in New Issue
Block a user