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

Method nextQuery

internal/sqlbuilder/batch.go:34–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (b *BatchInserter) nextQuery() *inserter {
35 ins := &inserter{}
36 *ins = *b.inserter
37 i := 0
38 for values := range b.values {
39 i++
40 ins = ins.Values(values...).(*inserter)
41 if i == b.size {
42 break
43 }
44 }
45 if i == 0 {
46 return nil
47 }
48 return ins
49}
50
51// NextResult is useful when using PostgreSQL and Returning(), it dumps the
52// next slice of results to dst, which can mean having the IDs of all inserted

Callers 2

NextResultMethod · 0.95
WaitMethod · 0.95

Implementers 1

BatchInserterinternal/sqlbuilder/batch.go

Calls 1

ValuesMethod · 0.95

Tested by

no test coverage detected