MCPcopy
hub / github.com/dosco/graphjin / QueryContext

Method QueryContext

wasm/mysql.go:51–62  ·  view source on GitHub ↗
(ctx context.Context, query string, nargs []driver.NamedValue)

Source from the content-addressed store, hash-verified

49}
50
51func (c *MyConn) QueryContext(ctx context.Context, query string, nargs []driver.NamedValue) (driver.Rows, error) {
52 args := make([]driver.Value, len(nargs))
53 for _, v := range nargs {
54 args[(v.Ordinal - 1)] = v.Value
55 }
56
57 st, err := c.Prepare(query)
58 if err != nil {
59 return nil, err
60 }
61 return st.Query(args)
62}
63
64func (c *MyConn) Close() error {
65 return nil

Callers

nothing calls this directly

Calls 2

PrepareMethod · 0.95
QueryMethod · 0.65

Tested by

no test coverage detected