diff --git a/.cargo/config.toml b/.cargo/config.toml index 03feda3c7..398b7f9d6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,4 +1,5 @@ [env] +# Enable SQLite's built-in math functions for rusqlite's bundled libsqlite3. LIBSQLITE3_FLAGS = "SQLITE_ENABLE_MATH_FUNCTIONS" [target.x86_64-pc-windows-msvc] diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue index c77a2b64d..c4950f0f4 100644 --- a/apps/desktop/src/App.vue +++ b/apps/desktop/src/App.vue @@ -204,6 +204,7 @@ const { cancelActiveExecution, tryExplain, onDangerConfirm, + explainMode, } = useSqlExecution({ activeTab, activeConnection, @@ -1073,6 +1074,8 @@ onUnmounted(() => { :active-tab="activeTab" :active-connection="activeConnection" :executable-sql="executableSql" + :explain-mode="explainMode" + @update:explain-mode="(m: 'explain' | 'autotrace') => (explainMode = m)" @execute="tryExecute()" @cancel="cancelActiveExecution()" @explain="tryExplain()" diff --git a/apps/desktop/src/components/explain/ExplainPlanNodeTree.vue b/apps/desktop/src/components/explain/ExplainPlanNodeTree.vue index 6e092912c..bab313852 100644 --- a/apps/desktop/src/components/explain/ExplainPlanNodeTree.vue +++ b/apps/desktop/src/components/explain/ExplainPlanNodeTree.vue @@ -1,43 +1,71 @@ diff --git a/apps/desktop/src/components/layout/EditorToolbar.vue b/apps/desktop/src/components/layout/EditorToolbar.vue index d9b960cfb..9102f6d25 100644 --- a/apps/desktop/src/components/layout/EditorToolbar.vue +++ b/apps/desktop/src/components/layout/EditorToolbar.vue @@ -33,12 +33,14 @@ const props = defineProps<{ activeTab: QueryTab; activeConnection?: ConnectionConfig; executableSql: string; + explainMode?: string; }>(); const emit = defineEmits<{ execute: []; cancel: []; explain: []; + "update:explainMode": [mode: "explain" | "autotrace"]; formatSql: []; saveSql: []; openSql: []; @@ -165,6 +167,22 @@ function connectionById(connectionId: string): ConnectionConfig | undefined { activeTab.isExplaining ? t("toolbar.stopExplain") : t("toolbar.explainPlan") }} + +