| 99 | } |
| 100 | |
| 101 | func (d *impersonatedDB) ExecContext(ctx context.Context, query string, args []driver.NamedValue) ( |
| 102 | result driver.Result, err error) { |
| 103 | resp, err := d.sendQuery(query, args, types.WriteQuery) |
| 104 | if err != nil { |
| 105 | err = errors.Wrapf(err, "send query failed") |
| 106 | return |
| 107 | } |
| 108 | |
| 109 | result = &impersonatedResult{ |
| 110 | affectedRows: resp.Header.AffectedRows, |
| 111 | lastInsertID: resp.Header.LastInsertID, |
| 112 | } |
| 113 | |
| 114 | return |
| 115 | } |
| 116 | |
| 117 | func (d *impersonatedDB) QueryContext(ctx context.Context, query string, args []driver.NamedValue) ( |
| 118 | rows driver.Rows, err error) { |