]> Cypherpunks repositories - gostls13.git/commitdiff
database/sql: update doc related to per-connection state
authorEugene Kalinin <e.v.kalinin@gmail.com>
Wed, 6 Jun 2018 15:01:02 +0000 (18:01 +0300)
committerDaniel Theophanes <kardianos@gmail.com>
Wed, 6 Jun 2018 18:18:20 +0000 (18:18 +0000)
Fixes #25330

Change-Id: I41b5b3459ed7808d18112ec02d734e2268099a81
Reviewed-on: https://go-review.googlesource.com/116596
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
src/database/sql/sql.go

index 96d7742a3cccaf04fe521a66e04c2bddd64318e4..1e7a989089b8766bb5a8c4d73743c2bfbf3f3119 100644 (file)
@@ -340,8 +340,8 @@ var ErrNoRows = errors.New("sql: no rows in result set")
 //
 // The sql package creates and frees connections automatically; it
 // also maintains a free pool of idle connections. If the database has
-// a concept of per-connection state, such state can only be reliably
-// observed within a transaction. Once DB.Begin is called, the
+// a concept of per-connection state, such state can be reliably observed
+// within a transaction (Tx) or connection (Conn). Once DB.Begin is called, the
 // returned Tx is bound to a single connection. Once Commit or
 // Rollback is called on the transaction, that transaction's
 // connection is returned to DB's idle connection pool. The pool size