mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 08:20:33 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user