()
| 32 | } |
| 33 | |
| 34 | func (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 |
no test coverage detected