Skip to content

refactor(erd): ErdSource per connection, schema-aware catalog, neighbourhood load (#1147) - #1184

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
issue/1149-table-relations-view
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 2 commits into
devfrom
issue/1149-table-relations-view

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Refs #1147

Changes

  • ErdSource with loadSchema() and loadNeighbourhood(table, depth). SqlErdSource implements it on a query runner for PostgreSQL, MySQL and SQLite.
  • PostgreSQL catalog: tables outside the current schema are named schema.table, and foreign keys are read across user schemas, so a reference into another schema is drawn with the same key as the rest of the diagram.
  • Neighbourhood: foreign keys walked both ways up to depth, cycles and self references end the walk, columns are loaded only for the tables found. Pure function ErdCatalog.neighbourhood.
  • ErdView takes an optional source and focusTable (picked and centred after the first draw). Without a source it works as before.
  • GenericSqlWorkspace.showDiagram (default on); ExtensionSqlWorkspace turns it off, so the extension SQL workspace has no Diagram button.
  • Tests: neighbourhood depth, cycles, self references, a table without relations, the neighbourhood load with a fake runner, PostgreSQL cross-schema SQL.

Not in this PR

🤖 Generated with Claude Code

…ourhood load (#1147)

ErdSource gives the whole schema or the tables within a depth of one table.
The PostgreSQL catalog names tables outside the current schema schema.table
and reads foreign keys across user schemas, so a reference into another
schema is drawn. The neighbourhood walks foreign keys both ways up to the
depth, stops on cycles and self references, and loads columns only for the
tables it found. ErdView takes an optional source and a focused table.
Extension SQL workspaces hide the Diagram button.
@github-actions github-actions Bot added enhancement New feature or request frontend Theme parser epic label: frontend core Core library logic and services ui User interface components and widgets P2 Medium priority / Parity & Refactoring labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Grid scroll benchmark

metric base PR change
p50 7.81 ms 13.67 ms +75.0% ⚠️
p90 18.53 ms 20.01 ms +8.0% ⚠️
p99 36.17 ms 44.80 ms +23.9% ⚠️
stutters 334.00 326.00 -2.4%

Informational only (threshold 5%). Shared CI runners are noisy; re-run before trusting a single result.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Grid scroll benchmark

metric base PR change
p50 12.13 ms 16.73 ms +37.9% ⚠️
p90 21.87 ms 24.22 ms +10.7% ⚠️
p99 47.89 ms 53.24 ms +11.2% ⚠️
stutters 288.00 279.00 -3.1%

Informational only (threshold 5%). Shared CI runners are noisy; re-run before trusting a single result.

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 0e03de6 into dev Oct 9, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core library logic and services enhancement New feature or request frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant