@@ -55,6 +55,11 @@ func (pe *PgError) Error() string {
|
|||||||
return pe.Severity + ": " + pe.Message + " (SQLSTATE " + pe.Code + ")"
|
return pe.Severity + ": " + pe.Message + " (SQLSTATE " + pe.Code + ")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SQLState returns the SQLState of the error.
|
||||||
|
func (pe *PgError) SQLState() string {
|
||||||
|
return pe.Code
|
||||||
|
}
|
||||||
|
|
||||||
type connectError struct {
|
type connectError struct {
|
||||||
config *Config
|
config *Config
|
||||||
msg string
|
msg string
|
||||||
|
|||||||
Reference in New Issue
Block a user