sqlboiler icon indicating copy to clipboard operation
sqlboiler copied to clipboard

Option to disable struct tag generation

Open OscarVanL opened this issue 2 years ago • 1 comments

If you're having a generation problem please answer these questions before submitting your issue. Thanks!

What version of SQLBoiler are you using (sqlboiler --version)?

4.14.1

What is your database and version (eg. Postgresql 10)

Postgresql 14

Further information. What did you do, what did you expect?

In my application I have a distinction between API structs and database structs so I can more closely control which fields get exposed to users.

When sqlboiler generates the ORM, it includes json, toml, and yaml struct tags. Ideally, I don't want to accidentally mislead my colleagues that these are API models rather than database models, but the inclusion of these tags could make it appear this way.

For this reason I'd love an option to disable these tags.

OscarVanL avatar Feb 23 '23 00:02 OscarVanL

I understand your concerns. Since it does not affect the actual usage I would be reluctant to add an extra option (that then has to be maintained in the future)

If you contribute an implementation that is relatively straightforward, then I'll review it and may consider merging.

stephenafamo avatar Feb 23 '23 11:02 stephenafamo