@@ -96,7 +96,7 @@ private ParsedType detectParsedType() {
96
96
} else if (statement instanceof Merge ) {
97
97
return ParsedType .MERGE ;
98
98
} else {
99
- return ParsedType .SELECT ;
99
+ return ParsedType .OTHER ;
100
100
}
101
101
} catch (JSQLParserException e ) {
102
102
throw new IllegalArgumentException ("The query you provided is not a valid SQL Query!" , e );
@@ -316,10 +316,10 @@ private String detectAlias(String query) {
316
316
Select selectStatement = parseSelectStatement (query );
317
317
318
318
/*
319
- For all the other types ({@link ValuesStatement} and {@link SetOperationList}) it does not make sense to provide
320
- alias since:
321
- * ValuesStatement has no alias
322
- * SetOperation can have multiple alias for each operation item
319
+ * For all the other types ({@link ValuesStatement} and {@link SetOperationList}) it does not make sense to provide
320
+ * alias since:
321
+ * ValuesStatement has no alias
322
+ * SetOperation can have multiple alias for each operation item
323
323
*/
324
324
if (!(selectStatement .getSelectBody () instanceof PlainSelect )) {
325
325
return null ;
@@ -519,10 +519,11 @@ public DeclaredQuery getQuery() {
519
519
* <li>{@code ParsedType.SELECT}: means the top level statement is {@link Select}</li>
520
520
* <li>{@code ParsedType.INSERT}: means the top level statement is {@link Insert}</li>
521
521
* <li>{@code ParsedType.MERGE}: means the top level statement is {@link Merge}</li>
522
+ * <li>{@code ParsedType.OTHER}: means the top level statement is a different top-level type</li>
522
523
* </ul>
523
524
*/
524
525
enum ParsedType {
525
- DELETE , UPDATE , SELECT , INSERT , MERGE ;
526
+ DELETE , UPDATE , SELECT , INSERT , MERGE , OTHER ;
526
527
}
527
528
528
529
}
0 commit comments