/
vshmidt
/
cloudbeaver
Обзор
Документация
Войти
/
vshmidt
/
cloudbeaver
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
webapp/packages/plugin-sql-editor/src/SqlDataSource/ISqlDataSource.ts
89 строк
3 KB
Alexey Potsetsuev
dbeaver/pro#5083 feat: script status message (#3914)
21 ноя 2025, 11:58
Не верифицирован
21 ноя 2025, 11:58
411def4
Код
Авторство
О чём код?
/* * CloudBeaver - Cloud Database Manager * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ import type { IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; import type { ISyncExecutor } from '@cloudbeaver/core-executor'; import type { ILoadableState } from '@cloudbeaver/core-utils'; import type { IDatabaseDataModel } from '@cloudbeaver/plugin-data-viewer'; import type { QueryDataSource } from '../QueryDataSource.js'; import type { ESqlDataSourceFeatures } from './ESqlDataSourceFeatures.js'; import type { ISqlDataSourceHistory } from './SqlDataSourceHistory/ISqlDataSourceHistory.js'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; export interface ISqlDataSourceKey { readonly key: string; } export interface ISetScriptData { script: string; cursor?: ISqlEditorCursor; source?: string; } export interface ISqlEditorCursor { readonly anchor: number; readonly head: number; } export interface ISqlDataSource<TDataSource extends QueryDataSource = QueryDataSource> extends ILoadableState { readonly name: string | null; readonly icon?: string; readonly emptyPlaceholder?: string; readonly message?: TLocalizationToken; readonly loadingMessage?: TLocalizationToken; readonly sourceKey: string; readonly projectId: string | null; readonly script: string; readonly cursor: ISqlEditorCursor; readonly incomingScript?: string; readonly history: ISqlDataSourceHistory; readonly databaseModels: IDatabaseDataModel<TDataSource>[]; readonly executionContext?: IConnectionExecutionContextInfo; readonly isAutoSaveEnabled: boolean; readonly isIncomingChanges: boolean; readonly isSaved: boolean; readonly isScriptSaved: boolean; readonly isExecutionContextSaved: boolean; readonly onUpdate: ISyncExecutor; readonly onSetScript: ISyncExecutor<ISetScriptData>; readonly onDatabaseModelUpdate: ISyncExecutor<IDatabaseDataModel<TDataSource>[]>; isOpened(): boolean; isReadonly(): boolean; isEditing(): boolean; isOutdated(): boolean; markOutdated(): void; markUpdated(): void; hasFeature(feature: ESqlDataSourceFeatures): boolean; canRename(name: string | null): boolean; setName(name: string | null): void; setProject(projectId: string | null): void; setScript(script: string, source?: string, cursor?: ISqlEditorCursor): void; setCursor(anchor: number, head?: number): void; setEditing(state: boolean): void; setExecutionContext(executionContext?: IConnectionExecutionContextInfo): void; setIncomingExecutionContext(executionContext?: IConnectionExecutionContextInfo): void; setIncomingScript(script?: string): void; applyIncoming(): void; keepCurrent(): void; save(): Promise<void> | void; load(): Promise<void> | void; open(): Promise<void> | void; reset(): Promise<void> | void; dispose(): Promise<void> | void; }