MCPcopy
hub / github.com/jmoiron/sqlx / QueryxContext

Method QueryxContext

named_context.go:79–85  ·  view source on GitHub ↗

QueryxContext using this NamedStmt Any named placeholder parameters are replaced with fields from arg.

(ctx context.Context, arg interface{})

Source from the content-addressed store, hash-verified

77// QueryxContext using this NamedStmt
78// Any named placeholder parameters are replaced with fields from arg.
79func (n *NamedStmt) QueryxContext(ctx context.Context, arg interface{}) (*Rows, error) {
80 r, err := n.QueryContext(ctx, arg)
81 if err != nil {
82 return nil, err
83 }
84 return &Rows{Rows: r, Mapper: n.Stmt.Mapper, unsafe: isUnsafe(n)}, err
85}
86
87// QueryRowxContext this NamedStmt. Because of limitations with QueryRow, this is
88// an alias for QueryRow.

Callers 2

TestNamedContextQueriesFunction · 0.95
SelectContextMethod · 0.95

Calls 2

QueryContextMethod · 0.95
isUnsafeFunction · 0.85

Tested by 1

TestNamedContextQueriesFunction · 0.76