sqlgen
sqlgen copied to clipboard
Implement the ability to rename the tables without contriving your type names, and more!
This short-circuits the type parsing so that when it hits an element named "SQLName" it will automatically tack the tags parsed for that onto the parent type. This allows us to apply tags to the struct.
Additionally, this implements the following behaviour on the schema gen:
- if
skip: true
is in the tag, it will skip that field for name concatation. ( To allow fully-naming the fields of a column in the struct.)
An example / test case of this has been retrofitted into the demo/users.go file.