File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 29
29
/**
30
30
* An ANTLR {@link org.antlr.v4.runtime.tree.ParseTreeVisitor} that renders an HQL query without making any changes.
31
31
*
32
- * @author TaeHyun Kang(polyglot-k)
33
32
* @author Greg Turnquist
34
33
* @author Christoph Strobl
34
+ * @author Mark Paluch
35
+ * @author TaeHyun Kang
35
36
* @since 3.1
36
37
*/
37
38
@ SuppressWarnings ({ "ConstantConditions" , "DuplicatedCode" , "UnreachableCode" })
@@ -40,23 +41,26 @@ class HqlQueryRenderer extends HqlBaseVisitor<QueryTokenStream> {
40
41
/**
41
42
* Is this select clause a {@literal subquery}?
42
43
*
43
- * @return boolean
44
+ * @return {@literal true} is the query is a subquery; {@literal false} otherwise.
44
45
*/
45
46
static boolean isSubquery (ParserRuleContext ctx ) {
46
47
47
48
while (ctx != null ) {
49
+
48
50
if (ctx instanceof HqlParser .SubqueryContext || ctx instanceof HqlParser .CteContext ) {
49
51
return true ;
50
52
}
53
+
51
54
if (ctx instanceof HqlParser .SelectStatementContext ||
52
55
ctx instanceof HqlParser .InsertStatementContext ||
53
56
ctx instanceof HqlParser .DeleteStatementContext ||
54
- ctx instanceof HqlParser .UpdateStatementContext
55
- ) {
57
+ ctx instanceof HqlParser .UpdateStatementContext ) {
56
58
return false ;
57
59
}
60
+
58
61
ctx = ctx .getParent ();
59
62
}
63
+
60
64
return false ;
61
65
}
62
66
You can’t perform that action at this time.
0 commit comments