fix(redis): disable SQL formatting for Redis queries

This commit is contained in:
jearhe authored and GitHub committed 2026-09-09 14:44:40 +08:00
1 parent 894ecdec42
commit a535cf8f51
5 files changed
+58 -4

No files matched your search

+3
View File
@@ -1410,6 +1410,9 @@ function resolveToolbarTab(tabId?: string) {
function formatActiveSql(tabId?: string) {
const tab = resolveToolbarTab(tabId);
if (!tab || tab.mode !== "query" || !tab.sql.trim()) return;
const connection = connectionStore.getConfig(tab.connectionId);
const databaseType = effectiveDatabaseTypeForConnection(connection) ?? connection?.db_type;
if (!canFormatSqlForDatabaseType(databaseType)) return;
formatSqlRequest.value = {
id: (formatSqlRequest.value?.id ?? 0) + 1,
tabId: tab.id,