Closed fraenky8 closed 5 years ago
Could you also generate JSON tags with omitempty for optional NULL columns please?
@kaihendry: sorry but I don't want to introduce json
tags in a tool which handles mapping database tables to structs. Like I tried to explain here, working with your tables from the database and representing the data in what format whatsoever are two different concerns which I dont want to mix here.
Yeah, you're right. I can add them myself with :GoAddTags but I am super lazy with marking the optional values as omitempty.
I found the null documentation a little weird. https://youtu.be/1mnMmMF3Dx0?t=451
native|primitive
? Just a comment. No need to change anything.
Hm I see, maybe I should point it more out which options means what.
sql
stands for the sql.Null*
datatypesprimitive
and native
map to the same thing namely using golang's builtin datatypes with pointers
Implement one more command line flag to determine which data type to use for
NULL
columns: