Skip to content

Conversation

joshuarubin
Copy link
Contributor

@joshuarubin joshuarubin commented Dec 11, 2019

The enum issue may only be because I am using a column with an array of enums.
Also, Scan() can panic if it's not passed a []byte. I can have it return an error instead, but that requires importing fmt or errors, wasn't sure if it was worth the trouble. Thoughts?

Copy link
Collaborator

@kyleconroy kyleconroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is happening when you're scanning into an array of enums, can you add a test case for that? It's a bit involved, but you can add a new query to the ondeck package.

Signed-off-by: Joshua Rubin <me@jawa.dev>
Signed-off-by: Joshua Rubin <me@jawa.dev>
@joshuarubin
Copy link
Contributor Author

OK, I've added a test that failed before this change.

@kyleconroy
Copy link
Collaborator

Thanks! I know update the db_test.go file isn't the easiest. Really appreciate adding the tests.

@kyleconroy kyleconroy merged commit 72fbaf5 into sqlc-dev:master Dec 11, 2019
@joshuarubin
Copy link
Contributor Author

Thanks!

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 this pull request may close these issues.

2 participants