Skip to content

proposal: Go2: database/sql LastInsertId() and RowsAffected() uint64 #32243

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

Closed
pjebs opened this issue May 25, 2019 · 3 comments
Closed

proposal: Go2: database/sql LastInsertId() and RowsAffected() uint64 #32243

pjebs opened this issue May 25, 2019 · 3 comments

Comments

@pjebs
Copy link
Contributor

pjebs commented May 25, 2019

For Go2,

LastInsertId() and RowsAffected() should return uint64 instead of int64.

I came across an issue relating to this on MySQL recently.

@gopherbot gopherbot added this to the Proposal milestone May 25, 2019
@pjebs
Copy link
Contributor Author

pjebs commented May 25, 2019

Another solution is LastInsertId() returns a string.

It is foreseeable that some databases have a primary key as a string (MySQL supports this) with no integer auto_increment.

In that case, a hypothetical driver should be able to return a string or interface{}.

@kardianos
Copy link
Contributor

This is issue https://golang.org/issue/19055 .

@kardianos
Copy link
Contributor

I'm closing this issue. Please comment on #19055 .

@golang golang locked and limited conversation to collaborators May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants