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

enums should be a string type? #14

Open
daytonlowell opened this issue Feb 21, 2020 · 1 comment
Open

enums should be a string type? #14

daytonlowell opened this issue Feb 21, 2020 · 1 comment

Comments

@daytonlowell
Copy link
Collaborator

Currently joi-sql outputs enums as any() type.
https://github.com/TehShrike/joi-sql/blob/master/build.js#L68.

As far as I can tell, MySQL enum values can only be a string.
https://dev.mysql.com/doc/refman/5.7/en/enum.html#enum-literals)

I've switched yup-sql to output enums as a string type.
https://github.com/daytonlowell/yup-sql/blob/master/build.js#L75

Thoughts?

@daytonlowell daytonlowell changed the title enum should be string type? enums should be a string type? Feb 21, 2020
@TehShrike
Copy link
Owner

Makes sense to me 👍

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

No branches or pull requests

2 participants