dbeaver/pro#7854 feat: display query with parameters (#4064)

* dbeaver/pro#7854 feat: display query with parameters

* fix: use replaceAll instead of replace

* dbeaver/pro#7854 fix: support parameters and variables

---------

Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
This commit is contained in:
Alexey Potsetsuev
2026-01-22 00:18:25 +08:00
committed by GitHub
co-authored by Daria Marutkina
parent 1deffb984b
commit 90fcbe6b7f
39 changed files with 286 additions and 89 deletions
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2025 DBeaver Corp and others
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ import {
import { ConnectionDialectResource, type IConnectionInfoParams } from '@cloudbeaver/core-connections';
import type { DialogComponentProps } from '@cloudbeaver/core-dialogs';
import { useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6';
import { SQLCodeEditorLoader, useSqlDialectExtension } from '@cloudbeaver/plugin-sql-editor-new';
import { SQLCodeEditor, useSqlDialectExtension } from '@cloudbeaver/plugin-sql-editor-codemirror';
import style from './ScriptPreviewDialog.module.css';
@@ -57,13 +57,7 @@ export const ScriptPreviewDialog = observer<DialogComponentProps<Payload>>(funct
<CommonDialogHeader title="data_viewer_script_preview_dialog_title" icon="sql-script" onReject={rejectDialog} />
<CommonDialogBody noBodyPadding noOverflow>
<div className={s(styles, { wrapper: true })}>
<SQLCodeEditorLoader
className={s(styles, { sqlCodeEditorLoader: true })}
value={payload.script}
extensions={extensions}
lineNumbers
readonly
/>
<SQLCodeEditor className={s(styles, { sqlCodeEditorLoader: true })} value={payload.script} extensions={extensions} lineNumbers readonly />
</div>
</CommonDialogBody>
<CommonDialogFooter className={s(styles, { footer: true })}>