File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,13 @@ type Batch struct {
60
60
QueuedQueries []* QueuedQuery
61
61
}
62
62
63
- // Queue queues a query to batch b. query can be an SQL query or the name of a prepared statement.
64
- // The only pgx option argument that is supported is QueryRewriter. Queries are executed using the
65
- // connection's DefaultQueryExecMode.
63
+ // Queue queues a query to batch b. query can be an SQL query or the name of a prepared statement. The only pgx option
64
+ // argument that is supported is QueryRewriter. Queries are executed using the connection's DefaultQueryExecMode.
65
+ //
66
+ // While query can contain multiple statements if the connection's DefaultQueryExecMode is QueryModeSimple, this should
67
+ // be avoided. QueuedQuery.Fn must not be set as it will only be called for the first query. That is, QueuedQuery.Query,
68
+ // QueuedQuery.QueryRow, and QueuedQuery.Exec must not be called. In addition, any error messages or tracing that
69
+ // include the current query may reference the wrong query.
66
70
func (b * Batch ) Queue (query string , arguments ... any ) * QueuedQuery {
67
71
qq := & QueuedQuery {
68
72
SQL : query ,
You can’t perform that action at this time.
0 commit comments