]> Cypherpunks repositories - gostls13.git/commit
database/sql: document Stmt lifetime
authorJustin Li <git@justinli.net>
Wed, 23 Jan 2019 15:15:06 +0000 (15:15 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 8 Feb 2019 19:52:00 +0000 (19:52 +0000)
commitd5a36531b2e0a904d616fec55e64575d6583dd80
tree4cbcfa0ad76501248ec3fbf05c87f9b9df392233
parent7ccd3583eddcd79679fb29cfc83a6e6fb6973f1e
database/sql: document Stmt lifetime

When prepared on a DB, prepared statement code in database/sql handles everything to keep the prepared statement alive as it moves across the connection pool. Understanding this is an important part of using this API correctly, but it was only documented indirectly via `(*Tx) Prepare*`.

Change-Id: Ic8757e0150d59e675d9f0252f6c15aef2cc2e831
GitHub-Last-Rev: 55dba87458542cb631baac80aeea0c3607d8f421
GitHub-Pull-Request: golang/go#29890
Reviewed-on: https://go-review.googlesource.com/c/159077
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
src/database/sql/sql.go