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

Fix Valuers by returning driver.ErrSkip if couldn't convert type internally #709

Merged
merged 1 commit into from
Nov 16, 2017

Conversation

randomjunk
Copy link
Contributor

Description

CheckNamedValue was returning a hard error instead of driver.ErrSkip if it couldn't convert the type. This commit intercepts the error and returns driver.ErrSkip to fix the use of Valuers.

Added a test that Valuer types are handled correctly. This test fails without the fix.

CheckNamedValue code was included recently:
#690

Issue was reported in:
#708

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • [-] Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

…rnally

Added a test that Valuer types are handled correctly. This test fails without the fix.

CheckNamedValue code was included recently and breaks existing applications:
go-sql-driver#690

Reported in:
go-sql-driver#708
@julienschmidt julienschmidt merged commit b816f3d into go-sql-driver:master Nov 16, 2017
@julienschmidt
Copy link
Member

Thanks for the quick fix!

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