DTStack / DTStack/dt-sql-parser

[Feature Request]: 希望 getSuggestionAtCaretPosition 返回的 "column" 的 wordRanges 可以包含到值

未关闭
#428 5 条评论 0 个 reaction 已指派 1 人 已被 @liuxy0551 认领 在 GitHub 查看
主要语言
TypeScript
星标
394
派生
108
平均合并
3 天 21 小时
30 天内合并 PR
2

描述

### Topic

Enhance existing features

### Which SQL?
Hive

### SQL content
`SELECT * from hive_current_catalog_schema1 WHERE hive_current_catalog_schema1 = `

### What happened?
此时返回的补全项是重新推荐一个新的column
Image

### Description

希望 getSuggestionAtCaretPosition 返回的 "column" 的 wordRanges 可以包含到值,如期望返回的 column wordRanges 的结构:
```
[
{
"syntaxContextType": "column",
"wordRanges": [
{
"text": "hive_current_catalog_schema1",
"line": 1,
"startIndex": 49,
"endIndex": 76,
"startColumn": 50,
"endColumn": 78
},
{
"text": " ",
"line": 1,
"startIndex": 77,
"endIndex": 77,
"startColumn": 78,
"endColumn": 79
},
{
"text": "=",
"line": 1,
"startIndex": 78,
"endIndex": 78,
"startColumn": 79,
"endColumn": 80
},
{
"text": " ",
"line": 1,
"startIndex": 79,
"endIndex": 79,
"startColumn": 80,
"endColumn": 81
}
]
}
]
```
这样的话,可以根据当前的column,去进行下一步的处理,如查询这个column有什么枚举值之类的

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。