| 632 | } |
| 633 | |
| 634 | func (mc *mysqlConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) { |
| 635 | dargs, err := namedValueToValue(args) |
| 636 | if err != nil { |
| 637 | return nil, err |
| 638 | } |
| 639 | |
| 640 | if err := mc.watchCancel(ctx); err != nil { |
| 641 | return nil, err |
| 642 | } |
| 643 | |
| 644 | rows, err := mc.query(query, dargs) |
| 645 | if err != nil { |
| 646 | mc.finish() |
| 647 | return nil, err |
| 648 | } |
| 649 | rows.finish = mc.finish |
| 650 | return rows, err |
| 651 | } |
| 652 | |
| 653 | func (mc *mysqlConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) { |
| 654 | dargs, err := namedValueToValue(args) |