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

Function NamedExec

named.go:452–458  ·  view source on GitHub ↗

NamedExec 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.

(e Ext, query string, arg interface{})

Source from the content-addressed store, hash-verified

450// then runs Exec on the result. Returns an error from the binding
451// or the query execution itself.
452func NamedExec(e Ext, query string, arg interface{}) (sql.Result, error) {
453 q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e))
454 if err != nil {
455 return nil, err
456 }
457 return e.Exec(q, args...)
458}

Callers 2

NamedExecMethod · 0.85
NamedExecMethod · 0.85

Calls 5

bindNamedMapperFunction · 0.85
BindTypeFunction · 0.85
mapperForFunction · 0.85
DriverNameMethod · 0.65
ExecMethod · 0.65

Tested by

no test coverage detected