MCPcopy Index your code
hub / github.com/upper/db / Wait

Method Wait

internal/sqlbuilder/batch.go:69–81  ·  view source on GitHub ↗

Wait blocks until the whole batch is executed.

()

Source from the content-addressed store, hash-verified

67
68// Wait blocks until the whole batch is executed.
69func (b *BatchInserter) Wait() error {
70 for {
71 q := b.nextQuery()
72 if q == nil {
73 break
74 }
75 if _, err := q.Exec(); err != nil {
76 b.err = err
77 break
78 }
79 }
80 return b.Err()
81}
82
83// Err returns any error while executing the batch.
84func (b *BatchInserter) Err() error {

Callers

nothing calls this directly

Implementers 1

BatchInserterinternal/sqlbuilder/batch.go

Calls 3

nextQueryMethod · 0.95
ErrMethod · 0.95
ExecMethod · 0.65

Tested by

no test coverage detected