rmp135 / sql-ts

Generate TypeScript interfaces from a SQL database.
MIT License
466 stars 64 forks source link

Add "sortColumn" option for handling columns order #128

Closed zydmayday closed 1 year ago

zydmayday commented 1 year ago

In Config, provide a new option called sortColumn, sortColumn can have 2 values,

If set sortColumn to origin, we won't sort columns and generate interface with original order.

Related issue: https://github.com/rmp135/sql-ts/issues/127

laurent22 commented 1 year ago

I hope that can be merged. We ended up with a very large diff with all the keys in a different order, and the keys being sorted has no value for us. I agree that respecting the original order, as in the database, should be possible (and even the default, in my opinion).