QueryContext implements the driver.StmtQueryContext.QueryContext.
(ctx context.Context, args []driver.NamedValue)
| 47 | |
| 48 | // QueryContext implements the driver.StmtQueryContext.QueryContext. |
| 49 | func (s *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) { |
| 50 | // build query from pattern |
| 51 | if atomic.LoadInt32(&s.closed) != 0 || s.c == nil { |
| 52 | return nil, driver.ErrBadConn |
| 53 | } |
| 54 | |
| 55 | return s.c.QueryContext(ctx, s.pattern, args) |
| 56 | } |
| 57 | |
| 58 | // ExecContext implements the driver.StmtExecContext.ExecContext. |
| 59 | func (s *stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) { |