2
0

Finish core batch operations

This commit is contained in:
Jack Christensen
2017-06-03 11:49:27 -05:00
parent fe0af9b357
commit 73f496d7de
7 changed files with 572 additions and 75 deletions
+5
View File
@@ -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)
}