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

Function NamedExecContext

named_context.go:127–133  ·  named_context.go::NamedExecContext

NamedExecContext uses BindStruct to get a query executable by the driver and then runs Exec on the result. Returns an error from the binding or the query execution itself.

(ctx context.Context, e ExtContext, query string, arg interface{})

Source from the content-addressed store, hash-verified

125// then runs Exec on the result. Returns an error from the binding
126// or the query execution itself.
127func NamedExecContext(ctx context.Context, e ExtContext, query string, arg interface{}) (sql.Result, error) {
128 q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e))
129 if err != nil {
130 return nil, err
131 }
132 return e.ExecContext(ctx, q, args...)
133}

Callers 2

NamedExecContextMethod · 0.85
NamedExecContextMethod · 0.85

Calls 5

bindNamedMapperFunction · 0.85
BindTypeFunction · 0.85
mapperForFunction · 0.85
DriverNameMethod · 0.65
ExecContextMethod · 0.65

Tested by

no test coverage detected