2
0

Merge pull request #682 from WGH-/batch-len

Add Len() method to *pgx.Batch
This commit is contained in:
Jack Christensen
2020-02-22 09:21:21 -06:00
committed by GitHub
+5
View File
@@ -26,6 +26,11 @@ func (b *Batch) Queue(query string, arguments ...interface{}) {
})
}
// Len returns number of queries that have been queued so far.
func (b *Batch) Len() int {
return len(b.items)
}
type BatchResults interface {
// Exec reads the results from the next query in the batch as if the query has been sent with Conn.Exec.
Exec() (pgconn.CommandTag, error)