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

Choose a reason for hiding this comment

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

LGTM

@methane methane merged commit 076901a into go-sql-driver:master Aug 13, 2020
@ikesyo ikesyo deleted the uint64-from-valuer branch August 13, 2020 05:02
@ikesyo
Copy link
Contributor Author

ikesyo commented Aug 13, 2020

Thanks! 😄

tz70s pushed 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 pushed 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants