feat: add connection colors, query history, SQL autocomplete, and EXPLAIN visualizer
Add four developer/QA features: - Connection color coding: color picker in dialog, colored indicators across toolbar, tabs, status bar, and connection selectors - Query history: Rust backend with JSON file storage (500 entry cap), sidebar panel with search/clear, auto-recording from workspace - Schema-aware SQL autocomplete: backend fetches column metadata, CodeMirror receives schema namespace with public tables unprefixed - EXPLAIN ANALYZE visualizer: recursive tree view with cost-colored bars, expand/collapse nodes, buffers info, Results/Explain tab toggle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
ColumnInfo,
|
||||
ConstraintInfo,
|
||||
IndexInfo,
|
||||
HistoryEntry,
|
||||
} from "@/types";
|
||||
|
||||
// Connections
|
||||
@@ -125,6 +126,30 @@ export const deleteRows = (params: {
|
||||
pkValuesList: unknown[][];
|
||||
}) => invoke<number>("delete_rows", params);
|
||||
|
||||
// History
|
||||
export const addHistoryEntry = (entry: HistoryEntry) =>
|
||||
invoke<void>("add_history_entry", { entry });
|
||||
|
||||
export const getHistory = (params?: {
|
||||
connectionId?: string;
|
||||
search?: string;
|
||||
limit?: number;
|
||||
}) =>
|
||||
invoke<HistoryEntry[]>("get_history", {
|
||||
connectionId: params?.connectionId,
|
||||
search: params?.search,
|
||||
limit: params?.limit,
|
||||
});
|
||||
|
||||
export const clearHistory = () => invoke<void>("clear_history");
|
||||
|
||||
// Completion schema
|
||||
export const getCompletionSchema = (connectionId: string) =>
|
||||
invoke<Record<string, Record<string, string[]>>>(
|
||||
"get_completion_schema",
|
||||
{ connectionId }
|
||||
);
|
||||
|
||||
// Export
|
||||
export const exportCsv = (
|
||||
path: string,
|
||||
|
||||
Reference in New Issue
Block a user