Skip to content

web: render table projections in the schema browser (#114)#130

Merged
orian merged 1 commit into
mainfrom
fix/114-web-projections
Jul 9, 2026
Merged

web: render table projections in the schema browser (#114)#130
orian merged 1 commit into
mainfrom
fix/114-web-projections

Conversation

@orian

@orian orian commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #114.

Problem

buildHTMLView renders sections for columns, indexes, constraints, engine, and settings — but nothing for TableSpec.Projections (added in #113). A projected table browsed with its projections invisible.

Fix

Add a Projections section to the table page: each projection's name and canonical query rendered as a query block, like a materialized view's query (SQL doesn't fit a table cell).

  • projectionView{Name, Query} + projectionViews([]ProjectionSpec) builder (nil when none, so the template omits the section).
  • Wired into buildHTMLView (KindTable) and objectData.
  • web/object.html: a Projections heading with an <h3> name + <pre class="code"> query per projection.

Tests

  • TestWebSections_ProjectionViews — builder maps the fixture projection; nil for none.
  • TestWebSections_TablePage — asserts the rendered page contains Projections, proj_by_ts, and its query (the fixture already carried a projection, as the issue noted).

Full suite green; go vet + gofmt clean.

buildHTMLView rendered columns, indexes, constraints, engine and settings for a table but nothing for TableSpec.Projections (added in #113), so a projected table browsed with its projections invisible.

Add a Projections section to the table page: each projection's name and canonical query rendered as a query block, like a materialized view's query. New projectionView type + projectionViews builder, wired into buildHTMLView and the object template; unit test for projectionViews and body assertions on the table page.

Closes #114.
@orian orian merged commit 4140d32 into main Jul 9, 2026
17 checks passed
@orian orian deleted the fix/114-web-projections branch July 9, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web: projections are not rendered in the schema browser

1 participant