Merge pull request #682 from WGH-/batch-len
Add Len() method to *pgx.Batch
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user