/
alt3rmann
/
cloudbeaver
Обзор
Документация
Войти
/
alt3rmann
/
cloudbeaver
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
webapp/packages/plugin-sql-editor/src/getSqlEditorName.ts
25 строк
730 B
Ainur
dbeaver/pro#6243 add permissions for executing and updating results (#3634)
11 авг 2025, 12:55
Не верифицирован
11 авг 2025, 12:55
7e0ad33
Код
Авторство
О чём код?
/* * 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 { Connection } from '@cloudbeaver/core-connections'; import type { ISqlEditorTabState } from './ISqlEditorTabState.js'; import type { ISqlDataSource } from './SqlDataSource/ISqlDataSource.js'; export function getSqlEditorName(state: ISqlEditorTabState, dataSource?: ISqlDataSource<any>, connection?: Connection): string { if (dataSource?.name) { return dataSource.name; } let name = `sql-${state.order}`; if (connection) { name += ` (${connection.name})`; } return name; }