Finish core batch operations
This commit is contained in:
@@ -43,6 +43,7 @@ func (r *Row) Scan(dest ...interface{}) (err error) {
|
||||
type Rows struct {
|
||||
conn *Conn
|
||||
connPool *ConnPool
|
||||
batch *Batch
|
||||
values [][]byte
|
||||
fields []FieldDescription
|
||||
rowCount int
|
||||
@@ -84,6 +85,10 @@ func (rows *Rows) Close() {
|
||||
rows.conn.log(LogLevelError, "Query", map[string]interface{}{"sql": rows.sql, "args": logQueryArgs(rows.args)})
|
||||
}
|
||||
|
||||
if rows.batch != nil && rows.err != nil {
|
||||
rows.batch.die(rows.err)
|
||||
}
|
||||
|
||||
if rows.connPool != nil {
|
||||
rows.connPool.Release(rows.conn)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user