Skip to content

Load functions and proceduress asynchronously#4784

Closed
xdelox wants to merge 1 commit into
apache:mainfrom
xdelox:4739-jdbc-metadata-cache
Closed

Load functions and proceduress asynchronously#4784
xdelox wants to merge 1 commit into
apache:mainfrom
xdelox:4739-jdbc-metadata-cache

Conversation

@xdelox

@xdelox xdelox commented Jan 15, 2025

Copy link
Copy Markdown
Contributor

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

return sqlKeywords;
input.updateKeywords(sqlKeywords);
wSql.addLineStyleListener(sqlKeywords);
wSql.redraw();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line and the previous one look ignored if not executed in the main thread or the open() method

sqlKeywords.add(functionsResultSet.getString("FUNCTION_NAME"));
String functionName = functionsResultSet.getString("FUNCTION_NAME");
if (functionName.contains(";")) {
functionName = functionName.substring(0, functionName.indexOf(";"));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this string replacement is here because of MS SQL Server: in fact, the getFunctions() method returns functions with something more. Like, if the function name is helloworld(), it returns helloworld;1, so we have to remove the substring from the semicolon on

@hansva

hansva commented Jan 27, 2025

Copy link
Copy Markdown
Contributor

I have made a new PR #4840 after the issues that have been raised, I no longer trust the results that we are getting from the JDBC drivers. To avoid issues we will use a fixed list per database.

@hansva hansva closed this Jan 27, 2025
@xdelox xdelox deleted the 4739-jdbc-metadata-cache branch August 28, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants