-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add SQL support with ER / schema diagrams #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,8 +58,10 @@ export default function Languages({ lang }: { lang: Locale }) { | |
| <> | ||
| <H1>Lenguajes</H1> | ||
| <Lead> | ||
| Weftmap soporta cinco lenguajes hoy. La arquitectura es ampliable: cada | ||
| Weftmap soporta seis lenguajes hoy. La arquitectura es ampliable: cada | ||
| lenguaje es una gramática de tree-sitter más un conjunto de consultas. | ||
| Cinco generan un <strong>call graph</strong>; SQL genera un diagrama | ||
| <strong> entidad-relación</strong>. | ||
| </Lead> | ||
|
|
||
| <Matrix headers={["Lenguaje", "Funciones", "Clases", "Imports", "Herencia"]} /> | ||
|
Comment on lines
+61
to
67
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the language matrix consistent with the “six languages” claim. The lead now says six supported languages, but the matrix still renders from Possible fix const ROWS: Row[] = [
{ lang: "Python", fns: true, classes: true, imports: true, extends: true },
{ lang: "JavaScript", fns: true, classes: true, imports: true, extends: true },
{ lang: "TypeScript", fns: true, classes: true, imports: true, extends: true },
{ lang: "Go", fns: true, classes: false, imports: false, extends: false },
{ lang: "Rust", fns: true, classes: false, imports: false, extends: false },
+ { lang: "SQL", fns: false, classes: false, imports: false, extends: false },
];Also applies to: 93-100 🤖 Prompt for AI Agents |
||
|
|
@@ -71,12 +73,14 @@ export default function Languages({ lang }: { lang: Locale }) { | |
| <LI><strong>TypeScript</strong> — igual que JavaScript pero con la gramática dedicada, así las anotaciones de tipos se parsean sin problemas.</LI> | ||
| <LI><strong>Go</strong> — funciones y métodos. Go no tiene clases, así que no hay nodos de clase ni herencia.</LI> | ||
| <LI><strong>Rust</strong> — funciones y llamadas. La resolución entre archivos usa definiciones únicas.</LI> | ||
| <LI><strong>SQL</strong> — diagrama ER a partir de DDL (<Code>CREATE TABLE</Code>, <Code>ALTER TABLE</Code>): tablas con columnas y tipos, claves PK/FK, relaciones por foreign key con cardinalidad (1:1, 1:N y N:M vía tablas puente). Orientado a PostgreSQL.</LI> | ||
| </UL> | ||
|
|
||
| <Callout kind="warn"> | ||
| En Go y Rust los imports son por paquete o módulo (no por archivo), así que no se dibujan | ||
| aristas de import. Las llamadas entre archivos del mismo paquete sí se | ||
| resuelven por nombre. | ||
| resuelven por nombre. SQL es un tipo de diagrama distinto: en lugar de | ||
| funciones y llamadas, dibuja tablas y relaciones. | ||
| </Callout> | ||
| </> | ||
| ); | ||
|
|
@@ -86,8 +90,10 @@ export default function Languages({ lang }: { lang: Locale }) { | |
| <> | ||
| <H1>Languages</H1> | ||
| <Lead> | ||
| Weftmap supports five languages today. The architecture is extensible: each | ||
| language is a tree-sitter grammar plus a set of queries. | ||
| Weftmap supports six languages today. The architecture is extensible: each | ||
| language is a tree-sitter grammar plus a set of queries. Five produce a | ||
| <strong> call graph</strong>; SQL produces an{" "} | ||
| <strong>entity-relationship</strong> diagram. | ||
| </Lead> | ||
|
|
||
| <Matrix headers={["Language", "Functions", "Classes", "Imports", "Inheritance"]} /> | ||
|
|
@@ -99,11 +105,14 @@ export default function Languages({ lang }: { lang: Locale }) { | |
| <LI><strong>TypeScript</strong> — same as JavaScript but with the dedicated grammar, so type annotations parse cleanly.</LI> | ||
| <LI><strong>Go</strong> — functions and methods. Go has no classes, so there are no class nodes or inheritance.</LI> | ||
| <LI><strong>Rust</strong> — functions and calls. Cross-file resolution uses unique definitions.</LI> | ||
| <LI><strong>SQL</strong> — ER diagram from DDL (<Code>CREATE TABLE</Code>, <Code>ALTER TABLE</Code>): tables with columns and types, PK/FK keys, and foreign-key relationships with cardinality (1:1, 1:N, and N:M via junction tables). PostgreSQL-oriented.</LI> | ||
| </UL> | ||
|
|
||
| <Callout kind="warn"> | ||
| In Go and Rust, imports are package- or module-based (not file-based), so import edges are not | ||
| drawn. Calls between files in the same package are still resolved by name. | ||
| SQL is a different diagram type: instead of functions and calls, it draws | ||
| tables and relationships. | ||
| </Callout> | ||
| </> | ||
| ); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.