aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/sql/driver')
-rw-r--r--src/database/sql/driver/types.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database/sql/driver/types.go b/src/database/sql/driver/types.go
index 0380572ab1..a322f85277 100644
--- a/src/database/sql/driver/types.go
+++ b/src/database/sql/driver/types.go
@@ -34,6 +34,10 @@ type ValueConverter interface {
// Valuer is the interface providing the Value method.
//
+// Errors returned by the [Value] method are wrapped by the database/sql package.
+// This allows callers to use [errors.Is] for precise error handling after operations
+// like [database/sql.Query], [database/sql.Exec], or [database/sql.QueryRow].
+//
// Types implementing Valuer interface are able to convert
// themselves to a driver [Value].
type Valuer interface {