Skip to content

Commit

Permalink
dbeaver/dbeaver#35475 Fix sql script execution
Browse files Browse the repository at this point in the history
  • Loading branch information
HocKu7 committed Oct 7, 2024
1 parent 0e32052 commit 1f2abd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public class WebSQLProcessor implements WebSessionProvider {
connection.getDataSource().getSQLDialect(), connection.getDataSourceContainer().getPreferenceStore());

ruleManager = new SQLRuleManager(syntaxManager);
ruleManager.loadRules(connection.getDataSource(), false);
ruleManager.loadRules(connection.getDataSourceContainer(), false);
}

void dispose() {
Expand Down Expand Up @@ -192,7 +192,7 @@ public WebSQLExecuteInfo processQuery(
document.set(sql);

SQLParserContext parserContext = new SQLParserContext(
context.getDataSource(),
context.getDataSource().getContainer(),
syntaxManager,
ruleManager,
document);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ public WebSQLCompletionProposal[] getCompletionProposals(
SQLScriptElement activeQuery;

if (position != null) {
DBPDataSource source = sqlContext.getProcessor().getConnection().getDataSource();
SQLParserContext parserContext = new SQLParserContext(
sqlContext.getProcessor().getConnection().getDataSource(),
source != null ? source.getContainer() : null,
completionContext.getSyntaxManager(),
completionContext.getRuleManager(),
document);
Expand Down

0 comments on commit 1f2abd3

Please sign in to comment.