提交 71a94ca0 编写于 作者: S serge-rider

#5634 alias.* completion fix

上级 512d78df
......@@ -118,7 +118,7 @@ public class SQLCompletionAnalyzer implements DBRRunnableParametrized<DBRProgres
} else if (syntaxManager.getDialect().isAttributeQueryWord(prevKeyWord)) {
request.setQueryType(SQLCompletionRequest.QueryType.COLUMN);
if (!request.isSimpleMode() && CommonUtils.isEmpty(request.getWordPart()) && wordDetector.getPrevDelimiter().equals(SQLCompletionAnalyzer.ALL_COLUMNS_PATTERN)) {
wordDetector.moveToDelimiter();
wordDetector.shiftOffset(-SQLCompletionAnalyzer.ALL_COLUMNS_PATTERN.length());
searchPrefix = SQLCompletionAnalyzer.ALL_COLUMNS_PATTERN;
}
} else if (SQLUtils.isExecQuery(syntaxManager.getDialect(), prevKeyWord)) {
......
......@@ -219,4 +219,8 @@ public class SQLWordPartDetector extends SQLIdentifierDetector
int shift = startOffset - delimiterOffset;
startOffset -= shift;
}
public void shiftOffset(int offset) {
startOffset += offset;
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册