构造函数
constructor
-
参数
- db: { dbTables: Map<string, DBTable> }
方法
getSuggestions
-
参数
- input: string
- cursorPos: number
getLastKeyword
-
getLastKeyword(tokens: string[]): string | null
getNextKeywordSuggestions
-
getNextKeywordSuggestions( lastKeyword: string, tokens: string[],): HintSuggestion[]
参数
- lastKeyword: string
- tokens: string[]
getTableContext
-
getTableContext(tokens: string[]): string | null
analyzeContext
-
analyzeContext( input: string, cursorPos: number, astNode?: SQLNode | null, astContext?: { node: SQLNode | null; cursorInNode: string } | null,): HintContext
参数
- input: string
- cursorPos: number
- astNode: SQLNode | null = null
可选astContext: { node: SQLNode | null; cursorInNode: string } | null
isInsideFunction
-
isInsideFunction(tokens: string[]): string | null
getParamIndex
-
getParamIndex(tokens: string[]): number
getAllColumns
-
getAllColumns(): { table: string; col: string }[]
返回 { table: string; col: string }[]
tokenizePartial
-
tokenizePartial(input: string): string[]
Get suggestions based on AST analysis