/
vshmidt
/
cloudbeaver
Обзор
Документация
Войти
/
vshmidt
/
cloudbeaver
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
webapp/packages/plugin-sql-editor/src/SqlDialectInfoService.ts
27 строк
1 KB
Alexey Potsetsuev
dbeaver/pro#6327 refactor: sql editor & vqb (#3742)
23 сен 2025, 13:45
Не верифицирован
23 сен 2025, 13:45
4f53ece
Код
Авторство
О чём код?
/* * 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 { ConnectionDialectResource, type IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; @injectable(() => [ConnectionDialectResource, NotificationService]) export class SqlDialectInfoService { constructor( private readonly connectionDialectResource: ConnectionDialectResource, private readonly notificationService: NotificationService, ) {} async formatScript(context: IConnectionExecutionContextInfo, query: string): Promise<string> { try { return await this.connectionDialectResource.formatScript(context, query); } catch (error: any) { this.notificationService.logException(error, 'Failed to format script'); } return query; } }