Open
Description
Version
e.g. v4.0.0-beta.4.10
The Type of SQL
mysql
Your Code
sql语句为:let text = SELECT * FROM current_catalog_schema1 as
let position = {lineNumber: 1, column: 41}
Problem
调用parser.getSuggestionAtCaretPosition(text, position)获取当前节点的语义信息;
结果如下:
{
syntax: [{
syntaxContextType: "table" ,
wordRanges:[
{
"text": "current_catalog_schema1",
"startIndex": 14,
"stopIndex": 36,
"line": 1,
"startColumn": 15,
"stopColumn": 37
},
{
"text": " ",
"startIndex": 37,
"stopIndex": 37,
"line": 1,
"startColumn": 38,
"stopColumn": 38
},
{
"text": "as",
"startIndex": 38,
"stopIndex": 38,
"line": 1,
"startColumn": 39,
"stopColumn": 39
}
]
}]
}
其中的current_catalog_schema1 as
不应该都被识别为"table"类型