gnormal / gnorm

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

[mysql] surface unsigned numeric types #86

Open Etomyutikos opened 6 years ago

Etomyutikos commented 6 years ago

I'm not 100% sure what the equivalent is for Postgres, but the problem that prompted this issue doesn't exist there.

In MySQL, numeric columns can be unsigned. Unfortunately, the DATA_TYPE column does not report that (but the COLUMN_TYPE column does). It's impossible to have a uint or its variants in Go with the currently exposed data. It's therefore possible to send invalid values to MySQL (such as negatives).

natefinch commented 6 years ago

doh. yeah, gotta fix that.