feat: add Greenplum 7 compatibility and AI SQL generation
Greenplum 7 (PG12-based) compatibility: - Auto-detect GP via version() string, store DbFlavor per connection - connect returns ConnectResult with version + flavor - Fix pg_total_relation_size to use c.oid (universal, safer on both PG/GP) - Branch is_identity column query for GP (lacks the column) - Branch list_sessions wait_event fields for GP - Exclude gp_toolkit schema in schema listing, completion, lookup, AI context - Smart StatusBar version display: GP shows "GP 7.0.0 (PG 12.4)" - Fix connection list spinner showing on all cards during connect AI SQL generation (Ollama): - Add AI settings, model selection, and generate_sql command - Frontend AI panel with prompt input and SQL output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ import { useAppStore } from "@/stores/app-store";
|
||||
import type { Tab } from "@/types";
|
||||
|
||||
export default function App() {
|
||||
const { activeConnectionId, addTab } = useAppStore();
|
||||
const { activeConnectionId, currentDatabase, addTab } = useAppStore();
|
||||
|
||||
const handleNewQuery = useCallback(() => {
|
||||
if (!activeConnectionId) return;
|
||||
@@ -22,10 +22,11 @@ export default function App() {
|
||||
type: "query",
|
||||
title: "New Query",
|
||||
connectionId: activeConnectionId,
|
||||
database: currentDatabase ?? undefined,
|
||||
sql: "",
|
||||
};
|
||||
addTab(tab);
|
||||
}, [activeConnectionId, addTab]);
|
||||
}, [activeConnectionId, currentDatabase, addTab]);
|
||||
|
||||
const handleCloseTab = useCallback(() => {
|
||||
const { activeTabId, closeTab } = useAppStore.getState();
|
||||
|
||||
Reference in New Issue
Block a user