You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every driver implementing "database/sql/driver" returns different messages when there are errors related to the integrity of constraints so they can not be handled easily.
So I did a proposal to add a type of error in the package "database/sql/driver" so it should be implemented by every driver.
github.com/go-sql-driver/mysql returns what MySQL sends, there's no mapping involved.
How should this be changed?
The error code alone is insufficient to infer all information (which index, which field, which table, ...).
Parsing the error string is brittle because it may change a little between versions and there's a whole bunch of them and they are not documented AFAIK.
How should the error types providing all the useful information look?
Every driver implementing "database/sql/driver" returns different messages when there are errors related to the integrity of constraints so they can not be handled easily.
So I did a proposal to add a type of error in the package "database/sql/driver" so it should be implemented by every driver.
Here it is the message with the proposal:
https://groups.google.com/forum/#!topic/golang-nuts/ECKF7N3jvjw
The text was updated successfully, but these errors were encountered: