#12037 Initialize variable rules at the very end

上级 a29e562d
......@@ -117,7 +117,7 @@ public class HANASQLDialect extends GenericSQLDialect implements TPRuleProvider
@Override
public void extendRules(@Nullable DBPDataSourceContainer dataSource, @NotNull List<TPRule> rules, @NotNull RulePosition position) {
if (position == RulePosition.INITIAL) {
if (position == RulePosition.FINAL) {
rules.add(new SQLVariableRule(this));
}
}
......
......@@ -315,7 +315,7 @@ public class SQLServerDialect extends JDBCSQLDialect implements TPRuleProvider {
@Override
public void extendRules(@Nullable DBPDataSourceContainer dataSource, @NotNull List<TPRule> rules, @NotNull RulePosition position) {
if (position == RulePosition.INITIAL) {
if (position == RulePosition.FINAL) {
rules.add(new SQLVariableRule(this));
}
if (position == RulePosition.KEYWORDS) {
......
......@@ -244,6 +244,10 @@ public class SQLRuleManager {
}
}
if (ruleProvider != null) {
ruleProvider.extendRules(dataSourceContainer, rules, TPRuleProvider.RulePosition.FINAL);
}
allRules = rules.toArray(new TPRule[0]);
}
......
......@@ -31,6 +31,7 @@ public interface TPRuleProvider {
enum RulePosition {
PARTITION,
INITIAL,
FINAL,
CONTROL,
QUOTES,
KEYWORDS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册