From fe6bd04947e26a962fab3cf7a354abd44333bda6 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Fri, 11 Nov 2022 11:22:50 +0100 Subject: update dependencies --- vendor/github.com/lib/pq/error.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/lib/pq/error.go') diff --git a/vendor/github.com/lib/pq/error.go b/vendor/github.com/lib/pq/error.go index 5cfe9c6..f67c5a5 100644 --- a/vendor/github.com/lib/pq/error.go +++ b/vendor/github.com/lib/pq/error.go @@ -402,6 +402,11 @@ func (err *Error) Fatal() bool { return err.Severity == Efatal } +// SQLState returns the SQLState of the error. +func (err *Error) SQLState() string { + return string(err.Code) +} + // Get implements the legacy PGError interface. New code should use the fields // of the Error struct directly. func (err *Error) Get(k byte) (v string) { @@ -444,7 +449,7 @@ func (err *Error) Get(k byte) (v string) { return "" } -func (err Error) Error() string { +func (err *Error) Error() string { return "pq: " + err.Message } -- cgit v1.2.3-70-g09d2