-
Notifications
You must be signed in to change notification settings - Fork 101
[Feature Request]: 希望 getSuggestionAtCaretPosition 返回的 "column" 的 wordRanges 可以包含到值 #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
可以再具体点吗,比如示例 SQL、期望返回的 column wordRanges 是什么结构 |
已补充 @liuxy0551 |
![]() // 当前语句中有的表
const tablesInAllSql: EntityContext[] =
entities?.filter(
(entity: EntityContext) => entity.entityContextType === EntityContextType.TABLE
) ?? [];
// 当前语句的表,可能是多个,比如使用了 join
const tablesInCurrentSql: EntityContext[] = tablesInAllSql.filter(
(entity: EntityContext) => entity?.belongStmt?.isContainCaret
); |
![]()
因此我无法知道当前的位置其实是
那我就可以按照 @liuxy0551 说的表字段的推荐方法,去做字段值的推荐。
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Topic
Enhance existing features
Which SQL?
Hive
SQL content
SELECT * from hive_current_catalog_schema1 WHERE hive_current_catalog_schema1 =
What happened?
此时返回的补全项是重新推荐一个新的column

Description
希望 getSuggestionAtCaretPosition 返回的 "column" 的 wordRanges 可以包含到值,如期望返回的 column wordRanges 的结构:
这样的话,可以根据当前的column,去进行下一步的处理,如查询这个column有什么枚举值之类的
The text was updated successfully, but these errors were encountered: