gnormal / gnorm

A database-first code generator for any language
https://gnorm.org
Other
488 stars 40 forks source link

Don't generate code if typemap is unavailable #57

Open Gurpartap opened 6 years ago

Gurpartap commented 6 years ago

^

natefinch commented 6 years ago

So, I actually don't think this is valid. The typemap is technically optional. If your templates don't need .Type, you don't need the typemap (like if you're generating docs about the database schema or something).

It might be worth a warning if you run with -v or something... but we shouldn't fail.

Gurpartap commented 6 years ago

My aim with this issue was to not allow generation of invalid code. Perhaps it is the template's responsibility to ensure this.