feat: add ER diagram support with crow's foot cardinality#117
Draft
kevinswiber wants to merge 1 commit intomainfrom
Draft
feat: add ER diagram support with crow's foot cardinality#117kevinswiber wants to merge 1 commit intomainfrom
kevinswiber wants to merge 1 commit intomainfrom
Conversation
Playground Preview
|
c49432b to
78cce24
Compare
Add `erDiagram` as a graph-family diagram type with full text and SVG rendering support. Parser: hand-written line-oriented parser for entities, typed attributes (PK/FK/UK keys, quoted comments), and relationships with cardinality notation (||, o|, }|, }o) and identifying/non-identifying line types. Graph IR: extend Arrow enum with 4 crow's foot variants (OnlyOne, ZeroOrOne, OneOrMore, ZeroOrMore) — the only IR change needed across the entire diagram-type parity effort. Rendering: SVG crow's foot markers using quadratic Bézier curves for the fork notation. Text mode uses head/tail labels for cardinality. Entities render as 2-compartment nodes (name + attributes) using the existing SEPARATOR pattern from class diagrams. Closes #101
78cce24 to
8091363
Compare
|
✔️ 8091363 - Conventional commits check succeeded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
erDiagramas a graph-family diagram type with text and SVG renderingArrowenum with 4 crow's foot cardinality variants (OnlyOne,ZeroOrOne,OneOrMore,ZeroOrMore) — the only graph IR change across the entire diagram-type parity effortSEPARATORpatternCloses #101
Test plan
just lintcleanjust architecture-checkcleanecho 'erDiagram\n CUSTOMER ||--o{ ORDER : places' | cargo run