@@ -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 );
@@ -314,10 +314,10 @@ private String detectAlias(String query) {
314
314
Select selectStatement = parseSelectStatement (query );
315
315
316
316
/*
317
- For all the other types ({@link ValuesStatement} and {@link SetOperationList}) it does not make sense to provide
318
- alias since:
319
- * ValuesStatement has no alias
320
- * SetOperation can have multiple alias for each operation item
317
+ * For all the other types ({@link ValuesStatement} and {@link SetOperationList}) it does not make sense to provide
318
+ * alias since:
319
+ * ValuesStatement has no alias
320
+ * SetOperation can have multiple alias for each operation item
321
321
*/
322
322
if (!(selectStatement .getSelectBody () instanceof PlainSelect )) {
323
323
return null ;
@@ -516,10 +516,11 @@ public DeclaredQuery getQuery() {
516
516
* <li>{@code ParsedType.SELECT}: means the top level statement is {@link Select}</li>
517
517
* <li>{@code ParsedType.INSERT}: means the top level statement is {@link Insert}</li>
518
518
* <li>{@code ParsedType.MERGE}: means the top level statement is {@link Merge}</li>
519
+ * <li>{@code ParsedType.OTHER}: means the top level statement is a different top-level type</li>
519
520
* </ul>
520
521
*/
521
522
enum ParsedType {
522
- DELETE , UPDATE , SELECT , INSERT , MERGE ;
523
+ DELETE , UPDATE , SELECT , INSERT , MERGE , OTHER ;
523
524
}
524
525
525
526
}
0 commit comments