Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/tauri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@
"@codemirror/language": "^6.13.1",
"@codemirror/state": "^6.7.6",
"@codemirror/view": "^6.43.15",
"@dagrejs/dagre": "^3.1.3",
"@glideapps/glide-data-grid": "^6.0.3",
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-dialog": "^2.8.4",
"@tauri-apps/plugin-opener": "^2",
"@vue-flow/background": "^1.3.2",
"@vue-flow/controls": "^1.1.3",
"@vue-flow/core": "^1.48.2",
"codemirror": "^6.0.2",
"lodash": "^4.18.1",
"marked": "^4.3.0",
Expand All @@ -33,6 +37,7 @@
},
"devDependencies": {
"@tauri-apps/cli": "^2",
"@types/dagre": "^0.7.54",
"@types/lodash": "^4.17.27",
"@types/react": "^18.3.31",
"@types/react-dom": "^18.3.7",
Expand Down
192 changes: 192 additions & 0 deletions apps/tauri/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apps/tauri/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
allowBuilds:
esbuild: true
vue-demi: true
onlyBuiltDependencies:
- esbuild
- vue-demi
19 changes: 18 additions & 1 deletion apps/tauri/src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::connection::{
ConnectionConfig, ConnectionError, ConnectionId, ConnectionManager, ConnectionRegistry,
PostgresObjectDetail, SchemaObject, SchemaObjectKind, SqlObjectKind, SqlObjectNode,
ErdSchema, PostgresObjectDetail, SchemaObject, SchemaObjectKind, SqlObjectKind, SqlObjectNode,
SqliteOverview, TableSchema,
};
use crate::profiles::{ConnectionProfile, ProfileStore, ProfileStoreError};
Expand Down Expand Up @@ -345,6 +345,23 @@ pub fn db_sqlite_overview(
registry.with_sqlite(&id, |s| s.database_overview())
}

/// ER diagram catalog: tables/views + FK edges (optional neighbourhood).
#[tauri::command]
pub fn db_erd_schema(
id: ConnectionId,
schema: Option<String>,
focus: Option<String>,
depth: Option<u32>,
registry: State<'_, ConnectionRegistry>,
) -> Result<ErdSchema, ConnectionError> {
registry.erd_schema(
&id,
schema.as_deref(),
focus.as_deref(),
depth,
)
}

/// Execute SQL and stream `QueryEvent` batches over `on_event`.
/// Failures return as the invoke `Err` only (no dual channel `Error` event).
#[tauri::command]
Expand Down
Loading
Loading