Skip to content
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

[Feature Request][Crazy Idea] Diagram/Documentation generation #113

Open
Clonkk opened this issue May 14, 2021 · 6 comments
Open

[Feature Request][Crazy Idea] Diagram/Documentation generation #113

Clonkk opened this issue May 14, 2021 · 6 comments

Comments

@Clonkk
Copy link
Contributor

Clonkk commented May 14, 2021

I had this crazy idea to improve Norm the other day...

What if using Models declaration we make a graph of the Tables and use it to generate a diagram of the database ?
We can use an UML tool like Drawio (internal representation is XML) or a Nim alternative if there is one.

Do you think this would it be feasible ?

@moigagoo
Copy link
Owner

I’m sure there are tools that can do that for a DB, so I don’t really think Norm would be necessary for it.

But if somehow no such tool exist (I’d be surprised), sure, it’s a great idea!

Another great idea is to generate GraphQL or Jester or Prologue boilerplate code from models.

@Clonkk
Copy link
Contributor Author

Clonkk commented May 14, 2021

No idea if such tools exists but they would most likely require a running instance of the database and not source code. So you'd have to instantiate and populate a database to then generate schematics as opposed to just be able to generate the graph at compile time.

Anyway this was just something that popped into my mind

@moigagoo
Copy link
Owner

Any ideas how this could be done?

@Clonkk
Copy link
Contributor Author

Clonkk commented May 14, 2021

Either with a macro but then we'd have to handle the parsing of the AST and that ca' be tedious.

Otherwise (but I'm not sure if that's enough) during Table creation when the pragma are handed?

@moigagoo
Copy link
Owner

moigagoo commented May 14, 2021 via email

@Clonkk
Copy link
Contributor Author

Clonkk commented May 14, 2021

Oh, my initial idea was to generate an XML file on the draw.io format (it's looks like UML) but that's only because I don't know if there are Nim alternative for graph plotting

@moigagoo moigagoo added this to Norm Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants