PreparexContext prepares a statement. The provided context is used for the preparation of the statement, not for the execution of the statement.
(ctx context.Context, p PreparerContext, query string)
| 67 | // The provided context is used for the preparation of the statement, not for |
| 68 | // the execution of the statement. |
| 69 | func PreparexContext(ctx context.Context, p PreparerContext, query string) (*Stmt, error) { |
| 70 | s, err := p.PrepareContext(ctx, query) |
| 71 | if err != nil { |
| 72 | return nil, err |
| 73 | } |
| 74 | return &Stmt{Stmt: s, unsafe: isUnsafe(p), Mapper: mapperFor(p)}, err |
| 75 | } |
| 76 | |
| 77 | // GetContext does a QueryRow using the provided Queryer, and scans the |
| 78 | // resulting row to dest. If dest is scannable, the result must only have one |
no test coverage detected