Closed selfdanielj closed 5 months ago
I would absolutely be open to a PR allowing custom sort options. Rather than a --preserve-order
flag I'd prefer a sort flag that takes options though: --sort=default
, --sort=preserve
. That way we can add other options in the future.
Actually can you make it --column-sort
instead? I'm thinking we'll have table sorts as well in the future (the difference being mermaids TB
, BT
, RL
, and LR
). I've already run into a few cases where changing the table sorting would have been helpful.
Thanks for the great tool!
Right now the table fields are sorted with PK fields first, then FK fields, then the rest of the fields. In my case I'd like to preserve the order columns are defined in the class in the ouput diagrams. I made a few mods and built the project locally to implement this for my immediate needs.
Would you be open to a PR that leaves the current sorting behavior as the default and adds an option to preserve the field order in the tables?
For instance:
or
I have this working for
graph
and mermaid output but would need to verify and add some tests forinject
and dot output. I don't really have a time frame for this but thought it might be useful to others and would allow me to incorporate paracelsus into an automated build process.