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 (see [ConnConfig.DefaultQueryExecMode]). While query can contain multip
(query string, arguments ...any)
| 73 | // [QueuedQuery.Query], [QueuedQuery.QueryRow], and [QueuedQuery.Exec] must not be called. In addition, any error |
| 74 | // messages or tracing that include the current query may reference the wrong query. |
| 75 | func (b *Batch) Queue(query string, arguments ...any) *QueuedQuery { |
| 76 | qq := &QueuedQuery{ |
| 77 | SQL: query, |
| 78 | Arguments: arguments, |
| 79 | } |
| 80 | b.QueuedQueries = append(b.QueuedQueries, qq) |
| 81 | return qq |
| 82 | } |
| 83 | |
| 84 | // Len returns number of queries that have been queued so far. |
| 85 | func (b *Batch) Len() int { |
no outgoing calls