2
0

Add docs regarding closing BatchResults

This commit is contained in:
Jack Christensen
2019-09-19 22:46:43 -05:00
parent 9d3a4b5736
commit e16bfa9af5
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -685,7 +685,8 @@ func (c *Conn) QueryRow(ctx context.Context, sql string, args ...interface{}) Ro
}
// SendBatch sends all queued queries to the server at once. All queries are run in an implicit transaction unless
// explicit transaction control statements are executed.
// explicit transaction control statements are executed. The returned BatchResults must be closed before the connection
// is used again.
func (c *Conn) SendBatch(ctx context.Context, b *Batch) BatchResults {
distinctUnpreparedQueries := map[string]struct{}{}