2
0

Batch.Queue: document always uses the conn's DefaultQueryExecMode

The only way to change the query mode used by Batch.Queue and
SendBatch is to use a connection with a different
DefaultQueryExecMode. Add this to the function documentation.

Conn.SendBatch: Move where mode is defined to make this clearer in
the code. I spent time looking for the option that does not exist.
This commit is contained in:
Evan Jones
2023-12-04 16:32:00 -05:00
committed by Jack Christensen
parent 20bf953a17
commit 384fe7775c
2 changed files with 5 additions and 2 deletions
+2
View File
@@ -61,6 +61,8 @@ type Batch struct {
}
// Queue queues a query to batch b. query can be an SQL query or the name of a prepared statement.
// The only pgx option argument that is supported is QueryRewriter. Queries are executed using the
// connection's DefaultQueryExecMode.
func (b *Batch) Queue(query string, arguments ...any) *QueuedQuery {
qq := &QueuedQuery{
query: query,