Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

feat(grid): preview and edit table SQL in a dialog

二丫讲梵e89bda343f0f
diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue
index fddde248ff..e936052b47 100644
--- a/apps/desktop/src/components/grid/DataGrid.vue
+++ b/apps/desktop/src/components/grid/DataGrid.vue
@@ -292,6 +292,7 @@ import { createRowLowerTextCache } from "@/lib/dataGrid/dataGridRowLowerText";
import { dataGridPreviewLabelKey, dataGridSaveActionMode, dataGridSaveToolbarState } from "@/lib/dataGrid/dataGridSaveUi";
import { buildDataGridSavedRowRefreshPlan, dataGridSavedRowRefreshPatches, executeDataGridSavedRowRefreshQuery } from "@/lib/dataGrid/dataGridSavedRowRefresh";
import type { QueryEditabilityReason } from "@/lib/sql/sqlAnalysis";
+import type { DataGridSqlPreview } from "./dataGridSqlPreview";
import { sqlWithoutCommentsForCopy } from "@/lib/sql/sqlWithoutCommentsForCopy";
import { productionContextForDatabase } from "@/lib/database/productionSafety";
import { EDITOR_FONT_FAMILY_CSS_VAR } from "@/lib/editor/editorThemes";
@@ -722,6 +723,7 @@ function logDataGridTiming(message: string, payload?: Record<string, unknown>) {
}
const emit = defineEmits<{
+ viewSql: [preview: DataGridSqlPreview];
reload: [sql?: string, searchText?: string, whereInput?: string, orderBy?: string, limit?: number, offset?: number, intent?: DataGridReloadIntent];
paginate: [offset: number, limit: number, whereInput?: string, orderBy?: string, appendResult?: boolean];
sort: [column: string, columnIndex: number, direction: "asc" | "desc" | null, whereInput?: string, mode?: DataGridSortMode, effectiveOrderBy?: string];
@@ -12612,6 +12614,19 @@ function onRowContext(rowId: number, rowIndex: number) {
const sqlOneLiner = computed(() => userFacingSql.value.replace(/\s+/g, " ").trim());
+function viewStatusSql() {
+ if (props.context !== "table-data") {
+ void copyUserFacingSql();
+ return;
+ }
+ emit("viewSql", {
+ sql: userFacingSql.value,
+ actualSql: actualExecutionSql.value,
+ isCurrentPage: !!props.result.sqlPage,
+ probeLimit: props.result.sqlPage?.probe ? props.result.sqlPage.executedLimit : undefined,
+ });
+}
+
async function copyUserFacingSql() {
if (userFacingSql.value) await copyText(userFacingSql.value);
}
@@ -16648,14 +16663,14 @@ useUpdateBlocker(() => (hasPendingChanges.value || hasPendingDataEditorDraft.val
<div v-if="selectedColumnInfo" data-grid-column-info class="min-w-0 max-w-full truncate select-text max-sm:absolute max-sm:left-3 max-sm:right-3 max-sm:top-1" :title="selectedColumnInfo">
{{ selectedColumnInfo }}
</div>
- <div v-else-if="settingsStore.editorSettings.showDataGridStatusSql && sqlOneLiner" class="min-w-0 max-w-full justify-self-center">
+ <div v-else-if="settingsStore.editorSettings.showDataGridStatusSql && sqlOneLiner" class="flex min-w-0 max-w-full items-center gap-1 justify-self-center">
<CustomContextMenu :items="statusSqlContextMenuItems" v-slot="{ onContextMenu }">
<Tooltip>
<TooltipTrigger as-child>
- <span class="block min-w-0 max-w-full truncate opacity-60 cursor-pointer hover:opacity-100" data-result-sql @click="copyUserFacingSql" @contextmenu="onContextMenu">
+ <button type="button" class="block min-w-0 max-w-full truncate text-left opacity-60 cursor-pointer hover:opacity-100" data-result-sql :aria-label="t(context === 'table-data' ? 'grid.viewQuerySql' : 'grid.copyQuerySql')" @click="viewStatusSql" @contextmenu="onContextMenu">
<span v-if="result.sqlPage">{{ t("grid.currentPageSql") }}: </span>
{{ sqlOneLiner }}
- </span>
+ </button>
</TooltipTrigger>
<TooltipContent side="top" class="max-w-md">
<div v-if="result.sqlPage" class="mb-1 font-medium">{{ t("grid.currentPageSql") }}</div>
@@ -16668,6 +16683,7 @@ useUpdateBlocker(() => (hasPendingChanges.value || hasPendingDataEditorDraft.val
</TooltipContent>
</Tooltip>
</CustomContextMenu>
+ <Button v-if="context === 'table-data'" variant="ghost" size="icon" class="h-6 w-6 shrink-0" :aria-label="t('grid.copyQuerySql')" :title="t('grid.copyQuerySql')" @click="copyUserFacingSql"><Copy class="h-3 w-3" /></Button>
</div>
<span v-else class="min-w-0" />
diff --git a/apps/desktop/src/components/grid/DataGridSqlPreviewDialog.vue b/apps/desktop/src/components/grid/DataGridSqlPreviewDialog.vue
new file mode 100644
index 0000000000..b7b912134d
--- /dev/null
+++ b/apps/desktop/src/components/grid/DataGridSqlPreviewDialog.vue
@@ -0,0 +1,58 @@
+<script setup lang="ts">
+import { ref } from "vue";
+import { useI18n } from "vue-i18n";
+import { Copy } from "@lucide/vue";
+import { Button } from "@/components/ui/button";
+import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import { copyToClipboard } from "@/lib/common/clipboard";
+import { useToast } from "@/composables/useToast";
+import type { DataGridSqlPreview } from "./dataGridSqlPreview";
+
+const props = defineProps<{ preview: DataGridSqlPreview; canOpenQuery: boolean }>();
+const emit = defineEmits<{ close: []; openQuery: [sql: string] }>();
+const { t } = useI18n();
+const { toast } = useToast();
+// The host mounts a fresh dialog for each snapshot; background refreshes never replace the draft.
+const draft = ref(props.preview.sql);
+
+async function copySql(sql: string) {
+ try {
+ await copyToClipboard(sql);
+ toast(t("grid.copied"));
+ } catch (error: unknown) {
+ toast(t("grid.copyFailed", { message: error instanceof Error ? error.message : String(error) }), 5000);
+ }
+}
+</script>
+
+<template>
+ <Dialog :open="true" @update:open="!$event && emit('close')">
+ <DialogContent class="flex max-h-[calc(var(--dbx-viewport-height)-2rem)] flex-col sm:max-w-3xl">
+ <DialogHeader>
+ <DialogTitle>{{ t("grid.viewQuerySql") }}</DialogTitle>
+ <DialogDescription>{{ t("grid.sqlPreviewDraftHint") }}</DialogDescription>
+ </DialogHeader>
+ <div class="min-h-0 flex-1 overflow-auto space-y-3">
+ <div class="text-xs font-medium">{{ preview.isCurrentPage ? t("grid.currentPageSql") : "SQL" }} · {{ t("grid.sqlPreviewDraft") }}</div>
+ <textarea
+ v-model="draft"
+ data-native-clipboard
+ :aria-label="t('grid.sqlPreviewDraft')"
+ spellcheck="false"
+ class="block h-[40vh] min-h-32 w-full resize-none overflow-auto rounded-md border border-input bg-background p-3 font-mono text-xs leading-relaxed select-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ />
+ <p v-if="preview.probeLimit !== undefined" class="text-xs text-muted-foreground">{{ t("grid.pageProbeDescription", { count: preview.probeLimit }) }}</p>
+ <details v-if="preview.actualSql && preview.actualSql.trim() !== preview.sql.trim()" class="rounded-md border p-3">
+ <summary class="cursor-pointer text-xs font-medium">{{ t("grid.actualExecutionSql") }}</summary>
+ <textarea :value="preview.actualSql" readonly data-native-clipboard :aria-label="t('grid.actualExecutionSql')" class="mt-2 block h-32 w-full resize-none overflow-auto bg-background p-2 font-mono text-xs leading-relaxed select-text" />
+ <Button variant="outline" size="sm" class="mt-2" @click="copySql(preview.actualSql)"><Copy class="mr-1 h-3 w-3" />{{ t("grid.copyActualExecutionSql") }}</Button>
+ </details>
+ </div>
+ <DialogFooter class="shrink-0">
+ <Button variant="outline" @click="emit('close')">{{ t("common.close") }}</Button>
+ <Button variant="outline" :disabled="!draft.trim()" @click="copySql(draft)"><Copy class="mr-1 h-3 w-3" />{{ t("grid.copyQuerySql") }}</Button>
+ <Button :disabled="!canOpenQuery || !draft.trim()" @click="emit('openQuery', draft)">{{ t("grid.openSqlInNewQuery") }}</Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+</template>
diff --git a/apps/desktop/src/components/grid/dataGridSqlPreview.ts b/apps/desktop/src/components/grid/dataGridSqlPreview.ts
new file mode 100644
index 0000000000..c297eb23b5
--- /dev/null
+++ b/apps/desktop/src/components/grid/dataGridSqlPreview.ts
@@ -0,0 +1,6 @@
+export interface DataGridSqlPreview {
+ sql: string;
+ actualSql: string;
+ isCurrentPage: boolean;
+ probeLimit?: number;
+}
diff --git a/apps/desktop/src/components/layout/ContentArea.vue b/apps/desktop/src/components/layout/ContentArea.vue
index f2cd496ebf..86438a3786 100644
--- a/apps/desktop/src/components/layout/ContentArea.vue
+++ b/apps/desktop/src/components/layout/ContentArea.vue
@@ -85,6 +85,7 @@ import ObjectDependenciesPanel from "@/components/objects/ObjectDependenciesPane
import { objectDependencyTarget, isObjectDependencySection, type ObjectDependencyTarget, type ObjectDetailsSection } from "@/lib/database/objectDependencyDetails";
import DataGridFreezeFirstColumnControl from "@/components/grid/DataGridFreezeFirstColumnControl.vue";
import DataGridStatusSqlControl from "@/components/grid/DataGridStatusSqlControl.vue";
+import type { DataGridSqlPreview } from "@/components/grid/dataGridSqlPreview";
import DataGridCopyFormatControl from "@/components/grid/DataGridCopyFormatControl.vue";
import DataGridFontFamilyControl from "@/components/grid/DataGridFontFamilyControl.vue";
import DataGridColumnWidthModeControl from "@/components/grid/DataGridColumnWidthModeControl.vue";
@@ -113,6 +114,7 @@ function preloadDataGridComponent() {
const QueryEditor = defineAsyncComponent({ loader: () => import("@/components/editor/QueryEditor.vue"), loadingComponent: QueryLoadingState, delay: 0 });
const DataGrid = defineAsyncComponent(loadDataGridComponent);
+const DataGridSqlPreviewDialog = defineAsyncComponent(() => import("@/components/grid/DataGridSqlPreviewDialog.vue"));
const QueryResultTransferDialog = defineAsyncComponent(() => import("@/components/transfer/QueryResultTransferDialog.vue"));
const RedisKeyBrowser = defineAsyncComponent(() => import("@/components/redis/RedisKeyBrowser.vue"));
const RedisQueryConsoleOutput = defineAsyncComponent(() => import("@/components/redis/RedisQueryConsoleOutput.vue"));
@@ -437,6 +439,41 @@ function viewObjectDependencySql(context: ObjectDependencyTarget, sql: string) {
const canOpenTableImport = computed(() => supportsTableImport(activeEffectiveDatabaseType.value));
const activeVectorConnection = computed(() => connectionStore.getConfig(props.activeTab.connectionId) ?? props.activeConnection);
const activeDataTabExecutionDatabase = computed(() => dataTabExecutionDatabase(props.activeConnection, props.activeTab.database, activeDataTabTableMeta.value?.catalog));
+const tableSqlPreview = ref<{
+ preview: DataGridSqlPreview;
+ connectionId: string;
+ database: string;
+ schema?: string;
+ catalog?: string;
+} | null>(null);
+
+function viewTableSql(preview: DataGridSqlPreview) {
+ const tab = props.activeTab;
+ if (tab.mode !== "data") return;
+ const meta = activeDataTabTableMeta.value;
+ tableSqlPreview.value = {
+ preview,
+ connectionId: tab.connectionId,
+ // Query tabs need the logical database inside the catalog, not the pool's internal database.
+ database: tab.database,
+ schema: meta?.schema ?? tab.schema,
+ catalog: meta?.catalog ?? tab.catalog,
+ };
+}
+
+function openTableSqlInNewQuery(sql: string) {
+ const snapshot = tableSqlPreview.value;
+ if (!snapshot?.connectionId || !sql.trim()) return;
+ tableSqlPreview.value = null;
+ queryStore.createTab(snapshot.connectionId, snapshot.database, undefined, "query", snapshot.schema, sql, snapshot.catalog, { forceNew: true, schemaQualifiesSql: true });
+}
+
+watch(
+ () => props.activeTab.id,
+ () => {
+ tableSqlPreview.value = null;
+ },
+);
const activeSqlStatementParameterOptions = computed(() =>
sqlStatementParameterOptionsForCompatibility(activeEffectiveDatabaseType.value, activeEffectiveDatabaseType.value === "opengauss" ? connectionStore.databaseCompatibilityMode(activeResultConnectionId.value, activeResultDatabase.value) : undefined),
);
@@ -3360,6 +3397,7 @@ defineExpose({
:editable="!activeTab.tableMetaPending && (isTableDataEditable(activeEffectiveDatabaseType, activeTableMeta?.primaryKeys ?? [], activeTableMeta?.tableType) || !!influxDbV1DeleteSaveHandler)"
:custom-save-handler="influxDbV1DeleteSaveHandler"
context="table-data"
+ @view-sql="viewTableSql"
:initial-where-input="activeTab.whereInput"
:database-type="activeEffectiveDatabaseType"
:connection-id="activeTab.connectionId"
@@ -3742,6 +3780,7 @@ defineExpose({
<DamengRoleAdmin :key="activeTab.id" :connection="activeConnection" />
</template>
+ <DataGridSqlPreviewDialog v-if="tableSqlPreview" :preview="tableSqlPreview.preview" :can-open-query="!!tableSqlPreview.connectionId" @close="tableSqlPreview = null" @open-query="openTableSqlInNewQuery" />
<Dialog v-model:open="resultRunRenameOpen">
<DialogContent class="sm:max-w-[400px]">
<DialogHeader>
diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.ts
index d341a7170c..46bbc8395e 100644
--- a/apps/desktop/src/i18n/locales/az.ts
+++ b/apps/desktop/src/i18n/locales/az.ts
@@ -2581,6 +2581,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "Kopyalamaq mümkün olmadı: {message}",
copySqlCondition: "SQL şərtini kopyala",
copyQuerySql: "SQL-i kopyala",
+ viewQuerySql: "SQL-ə bax",
+ sqlPreviewDraft: "Redaktə edilə bilən qaralama",
+ sqlPreviewDraftHint: "SQL-in müvəqqəti nüsxəsini redaktə edin. Dəyişikliklər cədvəl görünüşünə təsir etmir və bu dialoq bağlandıqda silinir. Davam etmək üçün onu yeni sorğu vərəqində açın.",
+ openSqlInNewQuery: "Yeni sorğu vərəqində aç",
copyExecutableSql: "SQL-i kopyala (şərhlərsiz)",
transpose: "Sətri transponə et",
transposeMultiRowToggle: "Transponə rejimi",
diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.ts
index 00dc657810..b453622bb6 100644
--- a/apps/desktop/src/i18n/locales/en.ts
+++ b/apps/desktop/src/i18n/locales/en.ts
@@ -3441,6 +3441,10 @@ export default {
copyActualExecutionSql: "Copy actual execution SQL",
pageProbeDescription: "Displays up to {count} rows for this page; reads at most one extra row to check whether another page exists.",
copyQuerySql: "Copy SQL",
+ viewQuerySql: "View SQL",
+ sqlPreviewDraft: "Editable draft",
+ sqlPreviewDraftHint: "Edit a temporary copy of the SQL. Changes do not affect the table view and are discarded when you close this dialog. Open it in a new query tab to keep working.",
+ openSqlInNewQuery: "Open in new query tab",
copyExecutableSql: "Copy SQL (without comments)",
transpose: "Transpose Row",
transposeMultiRowToggle: "Transpose mode",
diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.ts
index 02e0c9ef2d..f13df78d86 100644
--- a/apps/desktop/src/i18n/locales/es.ts
+++ b/apps/desktop/src/i18n/locales/es.ts
@@ -3016,6 +3016,10 @@ export default withEnglishFallback({
columnDragChipMany: "{names} ({count} columnas)",
copySqlCondition: "Copiar condición SQL",
copyQuerySql: "Copiar SQL",
+ viewQuerySql: "Ver SQL",
+ sqlPreviewDraft: "Borrador editable",
+ sqlPreviewDraftHint: "Edite una copia temporal del SQL. Los cambios no afectan a la vista de la tabla y se descartan al cerrar este diálogo. Ábrala en una nueva pestaña de consulta para seguir editando.",
+ openSqlInNewQuery: "Abrir en una nueva pestaña de consulta",
copyExecutableSql: "Copiar SQL (sin comentarios)",
copyAlterColumnSql: "Copiar como SQL ALTER",
alterSqlCopied: "SQL ALTER copiado al portapapeles",
diff --git a/apps/desktop/src/i18n/locales/id.ts b/apps/desktop/src/i18n/locales/id.ts
index 9ac1ef80b2..4bdeaa8b88 100644
--- a/apps/desktop/src/i18n/locales/id.ts
+++ b/apps/desktop/src/i18n/locales/id.ts
@@ -2890,6 +2890,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "Salin gagal: {message}",
copySqlCondition: "Salin Kondisi SQL",
copyQuerySql: "Salin SQL",
+ viewQuerySql: "Lihat SQL",
+ sqlPreviewDraft: "Draf yang dapat diedit",
+ sqlPreviewDraftHint: "Edit salinan sementara SQL. Perubahan tidak memengaruhi tampilan tabel dan akan dibuang saat dialog ini ditutup. Buka di tab kueri baru untuk melanjutkan pengeditan.",
+ openSqlInNewQuery: "Buka di tab kueri baru",
copyExecutableSql: "Salin SQL (tanpa komentar)",
transpose: "Transpos Baris",
transposeMultiRowToggle: "Mode transpos",
diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.ts
index ec991d4119..d785324c65 100644
--- a/apps/desktop/src/i18n/locales/it.ts
+++ b/apps/desktop/src/i18n/locales/it.ts
@@ -2915,6 +2915,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "Copia non riuscita: {message}",
copySqlCondition: "Copia Condizione SQL",
copyQuerySql: "Copia SQL",
+ viewQuerySql: "Visualizza SQL",
+ sqlPreviewDraft: "Bozza modificabile",
+ sqlPreviewDraftHint: "Modifica una copia temporanea dell'SQL. Le modifiche non influiscono sulla vista della tabella e vengono scartate alla chiusura di questa finestra. Aprila in una nuova scheda di query per continuare a modificarla.",
+ openSqlInNewQuery: "Apri in una nuova scheda di query",
copyExecutableSql: "Copia SQL (senza commenti)",
transpose: "Traspone Riga",
transposeMultiRowToggle: "Modalità trasposizione",
diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.ts
index cdfe427e4e..1218b32c89 100644
--- a/apps/desktop/src/i18n/locales/ja.ts
+++ b/apps/desktop/src/i18n/locales/ja.ts
@@ -2919,6 +2919,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "コピーに失敗しました: {message}",
copySqlCondition: "SQL条件をコピー",
copyQuerySql: "SQLをコピー",
+ viewQuerySql: "SQLを表示",
+ sqlPreviewDraft: "編集可能な下書き",
+ sqlPreviewDraftHint: "SQLの一時コピーを編集します。変更はテーブル表示に影響せず、このダイアログを閉じると破棄されます。編集を続けるには、新しいクエリタブで開いてください。",
+ openSqlInNewQuery: "新しいクエリタブで開く",
copyExecutableSql: "SQLをコピー(コメントなし)",
transpose: "行を転置",
transposeMultiRowToggle: "転置モード",
diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.ts
index 4e3f326507..74714253f1 100644
--- a/apps/desktop/src/i18n/locales/ko.ts
+++ b/apps/desktop/src/i18n/locales/ko.ts
@@ -3025,6 +3025,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "복사 실패: {message}",
copySqlCondition: "SQL 조건 복사",
copyQuerySql: "SQL 복사",
+ viewQuerySql: "SQL 보기",
+ sqlPreviewDraft: "편집 가능한 초안",
+ sqlPreviewDraftHint: "SQL의 임시 복사본을 편집합니다. 변경 사항은 테이블 보기에 영향을 주지 않으며 이 대화 상자를 닫으면 삭제됩니다. 계속 편집하려면 새 쿼리 탭에서 여세요.",
+ openSqlInNewQuery: "새 쿼리 탭에서 열기",
copyExecutableSql: "SQL 복사 (주석 제외)",
transpose: "행 전치",
transposeMultiRowToggle: "전치 모드",
diff --git a/apps/desktop/src/i18n/locales/pl.ts b/apps/desktop/src/i18n/locales/pl.ts
index 72ae9c219f..86350d3019 100644
--- a/apps/desktop/src/i18n/locales/pl.ts
+++ b/apps/desktop/src/i18n/locales/pl.ts
@@ -2962,6 +2962,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "Nie udało się skopiować: {message}",
copySqlCondition: "Kopiuj warunek SQL",
copyQuerySql: "Kopiuj SQL",
+ viewQuerySql: "Wyświetl SQL",
+ sqlPreviewDraft: "Edytowalna wersja robocza",
+ sqlPreviewDraftHint: "Edytuj tymczasową kopię SQL. Zmiany nie wpływają na widok tabeli i zostaną odrzucone po zamknięciu tego okna. Otwórz kopię w nowej karcie zapytania, aby kontynuować edycję.",
+ openSqlInNewQuery: "Otwórz w nowej karcie zapytania",
copyExecutableSql: "Kopiuj SQL (bez komentarzy)",
transpose: "Transponuj wiersz",
transposeMultiRowToggle: "Tryb transpozycji",
diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.ts
index 41ca99fcce..4804c309d6 100644
--- a/apps/desktop/src/i18n/locales/pt-BR.ts
+++ b/apps/desktop/src/i18n/locales/pt-BR.ts
@@ -2915,6 +2915,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "Falha ao copiar: {message}",
copySqlCondition: "Copiar Condição SQL",
copyQuerySql: "Copiar SQL",
+ viewQuerySql: "Visualizar SQL",
+ sqlPreviewDraft: "Rascunho editável",
+ sqlPreviewDraftHint: "Edite uma cópia temporária do SQL. As alterações não afetam a visualização da tabela e são descartadas ao fechar esta janela. Abra em uma nova aba de consulta para continuar editando.",
+ openSqlInNewQuery: "Abrir em uma nova aba de consulta",
copyExecutableSql: "Copiar SQL (sem comentários)",
transpose: "Transpor Linha",
transposeMultiRowToggle: "Modo de transposição",
diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.ts
index 8f556124b0..a4bc850756 100644
--- a/apps/desktop/src/i18n/locales/ru.ts
+++ b/apps/desktop/src/i18n/locales/ru.ts
@@ -3159,6 +3159,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "Ошибка копирования: {message}",
copySqlCondition: "Копировать условие SQL",
copyQuerySql: "Копировать SQL",
+ viewQuerySql: "Просмотр SQL",
+ sqlPreviewDraft: "Редактируемый черновик",
+ sqlPreviewDraftHint: "Редактируйте временную копию SQL. Изменения не влияют на представление таблицы и будут отменены при закрытии этого окна. Чтобы продолжить редактирование, откройте копию в новой вкладке запроса.",
+ openSqlInNewQuery: "Открыть в новой вкладке запроса",
copyExecutableSql: "Копировать SQL (без комментариев)",
transpose: "Транспонировать строку",
transposeMultiRowToggle: "Режим транспонирования",
diff --git a/apps/desktop/src/i18n/locales/th.ts b/apps/desktop/src/i18n/locales/th.ts
index e53f8da58e..a227b889e1 100644
--- a/apps/desktop/src/i18n/locales/th.ts
+++ b/apps/desktop/src/i18n/locales/th.ts
@@ -3358,6 +3358,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "คัดลอกไม่สำเร็จ: {message}",
copySqlCondition: "คัดลอกเงื่อนไข SQL",
copyQuerySql: "คัดลอก SQL",
+ viewQuerySql: "ดู SQL",
+ sqlPreviewDraft: "ฉบับร่างที่แก้ไขได้",
+ sqlPreviewDraftHint: "แก้ไขสำเนาชั่วคราวของ SQL การเปลี่ยนแปลงจะไม่ส่งผลต่อมุมมองตารางและจะถูกทิ้งเมื่อปิดกล่องโต้ตอบนี้ เปิดในแท็บคำสั่งค้นหาใหม่เพื่อแก้ไขต่อ",
+ openSqlInNewQuery: "เปิดในแท็บคำสั่งค้นหาใหม่",
copyExecutableSql: "คัดลอก SQL (ไม่มีคอมเมนต์)",
transpose: "สลับแถวและคอลัมน์",
transposeMultiRowToggle: "โหมดสลับแถวและคอลัมน์",
diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.ts
index 1c972dbf03..cd94a79896 100644
--- a/apps/desktop/src/i18n/locales/tr.ts
+++ b/apps/desktop/src/i18n/locales/tr.ts
@@ -2573,6 +2573,10 @@ export default withEnglishFallback({
copyAlterSqlFailed: "Kopyalama başarısız: {message}",
copySqlCondition: "SQL Koşulunu Kopyala",
copyQuerySql: "SQL Kopyala",
+ viewQuerySql: "SQL'i görüntüle",
+ sqlPreviewDraft: "Düzenlenebilir taslak",
+ sqlPreviewDraftHint: "SQL'in geçici bir kopyasını düzenleyin. Değişiklikler tablo görünümünü etkilemez ve bu iletişim kutusu kapatıldığında silinir. Düzenlemeye devam etmek için yeni bir sorgu sekmesinde açın.",
+ openSqlInNewQuery: "Yeni sorgu sekmesinde aç",
copyExecutableSql: "SQL'i kopyala (yorumlar olmadan)",
transpose: "Satırı Devrik Göster",
transposeMultiRowToggle: "Devrik görünüm modu",
diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.ts
index 8e60ab5f31..008efd0ab6 100644
--- a/apps/desktop/src/i18n/locales/zh-CN.ts
+++ b/apps/desktop/src/i18n/locales/zh-CN.ts
@@ -3373,6 +3373,10 @@ export default withEnglishFallback({
copyActualExecutionSql: "复制实际执行 SQL",
pageProbeDescription: "本页最多显示 {count} 行,额外读取最多 1 行以判断是否还有下一页。",
copyQuerySql: "复制 SQL",
+ viewQuerySql: "查看 SQL",
+ sqlPreviewDraft: "可编辑草稿",
+ sqlPreviewDraftHint: "在此编辑 SQL 的临时副本,不影响表数据页。关闭弹窗后草稿将丢弃,可在新查询页中打开以继续编辑。",
+ openSqlInNewQuery: "在新查询页中打开",
copyExecutableSql: "复制 SQL(不含注释)",
transpose: "转置查看",
transposeMultiRowToggle: "转置模式",
diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.ts
index 52fcd59a20..a4775cea57 100644
--- a/apps/desktop/src/i18n/locales/zh-TW.ts
+++ b/apps/desktop/src/i18n/locales/zh-TW.ts
@@ -2917,6 +2917,10 @@ export default withEnglishFallback({
copyActualExecutionSql: "複製實際執行 SQL",
pageProbeDescription: "本頁最多顯示 {count} 列,額外讀取最多 1 列以判斷是否還有下一頁。",
copyQuerySql: "複製 SQL",
+ viewQuerySql: "檢視 SQL",
+ sqlPreviewDraft: "可編輯草稿",
+ sqlPreviewDraftHint: "在此編輯 SQL 的暫存副本,不影響資料表頁面。關閉對話框後將捨棄草稿,可在新查詢頁面中開啟以繼續編輯。",
+ openSqlInNewQuery: "在新查詢頁面中開啟",
copyExecutableSql: "複製 SQL(不含註解)",
transpose: "轉置檢視",
transposeMultiRowToggle: "轉置模式",