xdelox commented on code in PR #4784:
URL: https://github.com/apache/hop/pull/4784#discussion_r1917014096
##########
plugins/transforms/tableinput/src/main/java/org/apache/hop/pipeline/transforms/tableinput/TableInputDialog.java:
##########
@@ -377,22 +388,27 @@ private List<String> getSqlReservedWords() {
databaseMetaData = db.getDatabaseMetaData();
if (databaseMetaData == null) {
logError("Couldn't get database metadata");
- return new ArrayList<>();
+ return;
}
List<String> sqlKeywords = new ArrayList<>();
try {
final ResultSet functionsResultSet =
databaseMetaData.getFunctions(null, null, null);
while (functionsResultSet.next()) {
- sqlKeywords.add(functionsResultSet.getString("FUNCTION_NAME"));
+ String functionName = functionsResultSet.getString("FUNCTION_NAME");
+ if (functionName.contains(";")) {
+ functionName = functionName.substring(0,
functionName.indexOf(";"));
+ }
+ sqlKeywords.add(functionName);
}
sqlKeywords.addAll(Arrays.asList(databaseMetaData.getSQLKeywords().split(",")));
} catch (SQLException e) {
logError("Couldn't extract keywords from database metadata. Proceding
without them.");
}
- return sqlKeywords;
+ input.updateKeywords(sqlKeywords);
+ wSql.addLineStyleListener(sqlKeywords);
+ wSql.redraw();
Review Comment:
this line and the previous one look ignored if not executed in the main
thread or the open() method
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]