You've already forked bsl_console
mirror of
https://github.com/salexdv/bsl_console.git
synced 2025-07-03 00:47:14 +02:00
Начало работы над подсказками для полей таблиц в запросе
This commit is contained in:
@ -1613,6 +1613,23 @@ class bslHelper {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fills array of completition for fields of querie's table
|
||||||
|
*
|
||||||
|
* @param {array} suggestions array of suggestions for provideCompletionItems
|
||||||
|
*/
|
||||||
|
getQueryFieldsCompletition(suggestions) {
|
||||||
|
|
||||||
|
if (this.lastExpression.endsWith('.')) {
|
||||||
|
|
||||||
|
// Let's find start of current query
|
||||||
|
let match = this.model.findPreviousMatch('(?:выбрать|select)', this.position, true);
|
||||||
|
console.log(match.range);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Completition provider for query language
|
* Completition provider for query language
|
||||||
*
|
*
|
||||||
@ -1631,7 +1648,7 @@ class bslHelper {
|
|||||||
|
|
||||||
this.getQueryCommonCompletition(suggestions, langDef, monaco.languages.CompletionItemKind.Module);
|
this.getQueryCommonCompletition(suggestions, langDef, monaco.languages.CompletionItemKind.Module);
|
||||||
this.getQueryParamsCompletition(suggestions, monaco.languages.CompletionItemKind.Enum);
|
this.getQueryParamsCompletition(suggestions, monaco.languages.CompletionItemKind.Enum);
|
||||||
|
this.getQueryFieldsCompletition(suggestions);
|
||||||
this.getSnippets(suggestions, querySnippets);
|
this.getSnippets(suggestions, querySnippets);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user