dbeaver/pro#6980 fix: elements ordering (#3770)

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
This commit is contained in:
Alexey Potsetsuev
2025-09-24 21:57:11 +08:00
committed by GitHub
co-authored by mr-anton-t
parent d0e86745f1
commit 1cacf6a5cc
2 changed files with 6 additions and 14 deletions
@@ -48,7 +48,7 @@ interface ISQLEditorDataPrivate extends ISQLEditorData {
state: ISqlEditorTabState;
reactionDisposer: IReactionDisposer | null;
hintsLimitIsMet: boolean;
loadDatabaseDataModels(): Promise<void>;
loadDatabaseDataModels(): void;
}
const MAX_HINTS_LIMIT = 200;
@@ -193,19 +193,10 @@ export function useSqlEditor(state: ISqlEditorTabState): ISQLEditorData {
} catch {}
},
async loadDatabaseDataModels(): Promise<void> {
// force script parsing, cursorSegment depends on it
await this.model.getResolvedSegment();
await this.executeQueryAction(
this.model.cursorSegment,
() => {
if (this.model.dataSource?.databaseModels.length) {
this.sqlQueryService.initDatabaseDataModels(this.state);
}
},
true,
true,
);
loadDatabaseDataModels(): void {
if (this.model.dataSource?.databaseModels.length) {
this.sqlQueryService.initDatabaseDataModels(this.state);
}
},
async executeQueryNewTab(): Promise<void> {