feat: support drag-and-drop preview for Parquet, CSV, TSV, JSON files (#35)

Uses DuckDB in-memory connection with read_parquet()/read_csv()/read_json().
No sidebar connection created, tab title shows file name only,
connection/database toolbar hidden for preview tabs.
This commit is contained in:
skyler
2026-04-30 17:49:40 +08:00
committed by GitHub
parent a248615819
commit 7e858296cd
2 changed files with 52 additions and 3 deletions
+9
View File
@@ -597,6 +597,14 @@ export const useConnectionStore = defineStore("connection", () => {
}));
}
function addEphemeralConnection(config: ConnectionConfig) {
const normalized = normalizeConnection(config);
if (!connections.value.find((c) => c.id === normalized.id)) {
connections.value.push(normalized);
}
connectedIds.value.add(normalized.id);
}
return {
connections,
activeConnectionId,
@@ -606,6 +614,7 @@ export const useConnectionStore = defineStore("connection", () => {
isTreeNodePinned,
toggleTreeNodePin,
addConnection,
addEphemeralConnection,
updateConnection,
removeConnection,
editingConnectionId,