(tx *sql.Tx, item *batchItem)
| 164 | } |
| 165 | |
| 166 | func (this *Batch) execItem(tx *sql.Tx, item *batchItem) error { |
| 167 | // check database status |
| 168 | if this.db.BeginUpdating() { |
| 169 | defer this.db.EndUpdating() |
| 170 | } else { |
| 171 | return errDBIsClosed |
| 172 | } |
| 173 | |
| 174 | if this.enableStat { |
| 175 | defer SharedQueryStatManager.AddQuery(item.query).End() |
| 176 | } |
| 177 | |
| 178 | _, err := tx.Exec(item.query, item.args...) |
| 179 | return err |
| 180 | } |
| 181 | |
| 182 | func (this *Batch) processErr(prefix string, err error) { |
| 183 | if err == nil { |
no test coverage detected