The Wayback Machine - https://web.archive.org/web/20210202124400/https://github.com/go-sql-driver/mysql/pull/1143
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

Support returning uint64 from Valuer in ConvertValue #1143

Merged
merged 1 commit into from Aug 13, 2020

Conversation

@ikesyo
Copy link
Contributor

@ikesyo ikesyo commented Aug 12, 2020

Description

Changed ConvertValue implementation to support returning uint64 from Valuer interface.

https://golang.org/pkg/database/sql/driver/#Value says:

Value is a value that drivers must be able to handle. It is either nil, a type handled by a database driver's NamedValueChecker interface, or an instance of one of these types:

Because this drivers' NamedValueCheckers (mysqlConn and mysqlStmt) suppot uint64 through ConvertValue, we should allow Valuer to return uint64 as well.

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
https://golang.org/pkg/database/sql/driver/#Value says:

> Value is a value that drivers must be able to handle. It is either nil, a type handled by a database driver's NamedValueChecker interface, or an instance of one of these types:
Copy link
Contributor

@shogo82148 shogo82148 left a comment

LGTM

@methane methane merged commit 076901a into go-sql-driver:master Aug 13, 2020
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
coverage/coveralls Coverage decreased (-0.01%) to 81.798%
Details
@ikesyo ikesyo deleted the ikesyo:uint64-from-valuer branch Aug 13, 2020
@ikesyo
Copy link
Contributor Author

@ikesyo ikesyo commented Aug 13, 2020

Thanks! 😄

tz70s added a commit to tz70s/mysql that referenced this pull request Sep 5, 2020
)

https://golang.org/pkg/database/sql/driver/#Value says:

> Value is a value that drivers must be able to handle. It is either nil, a type handled by a database driver's NamedValueChecker interface, or an instance of one of these types:
tz70s added a commit to tz70s/mysql that referenced this pull request Sep 5, 2020
)

https://golang.org/pkg/database/sql/driver/#Value says:

> Value is a value that drivers must be able to handle. It is either nil, a type handled by a database driver's NamedValueChecker interface, or an instance of one of these types:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants