mirror of https://github.com/jackc/pgx.git
parent
70bb7ab6cb
commit
b6669ae6dd
|
@ -55,6 +55,11 @@ func (pe *PgError) Error() string {
|
|||
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 {
|
||||
config *Config
|
||||
msg string
|
||||
|
|
Loading…
Reference in New Issue