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:
committed by
Jack Christensen
parent
20bf953a17
commit
384fe7775c
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user