Add note to Writer documentation

This commit is contained in:
Neil Alexander 2020-08-21 10:37:21 +01:00
parent 2d00e02d1d
commit a9a5bb5bc5
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -36,6 +36,9 @@ import "database/sql"
// will ALWAYS be nil in this mode. This is useful if you just // will ALWAYS be nil in this mode. This is useful if you just
// want to perform a single query on an already-prepared statement // want to perform a single query on an already-prepared statement
// without the overhead of opening a new transaction to do it in. // without the overhead of opening a new transaction to do it in.
//
// You MUST take particular care not to call Do() from within f()
// on the same Writer, or it will likely result in a deadlock.
type Writer interface { type Writer interface {
// Queue up one or more database write operations within the // Queue up one or more database write operations within the
// provided function to be executed when it is safe to do so. // provided function to be executed when it is safe to do so.