aboutsummaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorkorzhao <korzhao95@gmail.com>2021-08-02 16:53:25 +0000
committerDaniel Theophanes <kardianos@gmail.com>2021-09-04 15:01:53 +0000
commit5c224ec92102d7803c03ed2b482a68fad91b954b (patch)
treebbaa490c7adcd035270b024f0e6d1cfdb0d16935 /src/database
parentba66d62b688d50f4e89b724d1c5b48bb05f8b117 (diff)
downloadgo-5c224ec92102d7803c03ed2b482a68fad91b954b.tar.gz
go-5c224ec92102d7803c03ed2b482a68fad91b954b.zip
database/sql: improve the documentation of Conn.Raw
Fixes #47500 Change-Id: Ibd44e4db15ea45bb53a6651a6567edfe6104d3d6 GitHub-Last-Rev: 61b8abbc28908fc807af7188e19089ac454b4817 GitHub-Pull-Request: golang/go#47503 Reviewed-on: https://go-review.googlesource.com/c/go/+/338970 Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Trust: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/database')
-rw-r--r--src/database/sql/sql.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go
index 68fb392e0d..b40b5c8fe4 100644
--- a/src/database/sql/sql.go
+++ b/src/database/sql/sql.go
@@ -2002,8 +2002,8 @@ func (c *Conn) PrepareContext(ctx context.Context, query string) (*Stmt, error)
// Raw executes f exposing the underlying driver connection for the
// duration of f. The driverConn must not be used outside of f.
//
-// Once f returns and err is nil, the Conn will continue to be usable
-// until Conn.Close is called.
+// Once f returns and err is not equal to driver.ErrBadConn, the Conn will
+// continue to be usable until Conn.Close is called.
func (c *Conn) Raw(f func(driverConn interface{}) error) (err error) {
var dc *driverConn
var release releaseConn