]> Cypherpunks repositories - gostls13.git/commitdiff
database/sql: fix tx.Prepare documentation
authorMostafa Solati <mostafa.solati@gmail.com>
Tue, 3 Aug 2021 17:09:29 +0000 (21:39 +0430)
committerDaniel Theophanes <kardianos@gmail.com>
Wed, 3 Nov 2021 23:48:28 +0000 (23:48 +0000)
Fixes: #45978
Change-Id: I3d5ccd621d670f97bb1a642b4e84b6629347a315
Reviewed-on: https://go-review.googlesource.com/c/go/+/339291
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Trust: Cherry Mui <cherryyz@google.com>

src/database/sql/sql.go

index 897bca059b85403692569c3d2239b5a5a2f1c6b0..5131c08b511f4d14c22ebf0f8014b351dcf224f0 100644 (file)
@@ -2364,8 +2364,8 @@ func (tx *Tx) PrepareContext(ctx context.Context, query string) (*Stmt, error) {
 
 // Prepare creates a prepared statement for use within a transaction.
 //
-// The returned statement operates within the transaction and can no longer
-// be used once the transaction has been committed or rolled back.
+// The returned statement operates within the transaction and will be closed
+// when the transaction has been committed or rolled back.
 //
 // To use an existing prepared statement on this transaction, see Tx.Stmt.
 //