Commit f4faaa0f authored by gwenn's avatar gwenn

Implement QueryContext for Connection

parent 5ebb0219
......@@ -186,6 +186,18 @@ func (c *conn) ExecContext(ctx context.Context, query string, args []driver.Name
return c.c.result(), nil
}
func (c *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
if c.c.IsClosed() {
return nil, driver.ErrBadConn
}
st, err := c.c.Prepare(query)
if err != nil {
return nil, err
}
s := &stmt{s: st}
return s.QueryContext(ctx, args)
}
func (c *conn) Close() error {
return c.c.Close()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment