@@ -367,6 +367,7 @@ type QueryExOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) QueryEx(ctx context.Context, sql string, options *QueryExOptions, args ...interface{}) (rows *Rows, err error) {
|
func (c *Conn) QueryEx(ctx context.Context, sql string, options *QueryExOptions, args ...interface{}) (rows *Rows, err error) {
|
||||||
|
c.lastActivityTime = time.Now()
|
||||||
rows = c.getRows(sql, args)
|
rows = c.getRows(sql, args)
|
||||||
|
|
||||||
err = c.waitForPreviousCancelQuery(ctx)
|
err = c.waitForPreviousCancelQuery(ctx)
|
||||||
@@ -380,8 +381,6 @@ func (c *Conn) QueryEx(ctx context.Context, sql string, options *QueryExOptions,
|
|||||||
return rows, err
|
return rows, err
|
||||||
}
|
}
|
||||||
|
|
||||||
c.lastActivityTime = time.Now()
|
|
||||||
|
|
||||||
if err := c.lock(); err != nil {
|
if err := c.lock(); err != nil {
|
||||||
rows.fatal(err)
|
rows.fatal(err)
|
||||||
return rows, err
|
return rows, err
|
||||||
|
|||||||
Reference in New Issue
Block a user