Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mysql] surface unsigned numeric types #86

Open
Etomyutikos opened this issue Dec 7, 2017 · 1 comment · May be fixed by #89
Open

[mysql] surface unsigned numeric types #86

Etomyutikos opened this issue Dec 7, 2017 · 1 comment · May be fixed by #89

Comments

@Etomyutikos
Copy link
Member

Etomyutikos commented Dec 7, 2017

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
Copy link
Member

doh. yeah, gotta fix that.

Etomyutikos pushed a commit to codercom/gnorm that referenced this issue Dec 19, 2017
resolves gnormal#86

In MySQL, the DATA_TYPE column contains only the basic type of the
column. The COLUMN_TYPE column provides a more detailed explanation of
the column's type, including "unsigned" for numeric types.
@Etomyutikos Etomyutikos linked a pull request Dec 19, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants