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

Function bindMap

named.go:304–312  ·  view source on GitHub ↗

bindMap binds a named parameter query with a map of arguments.

(bindType int, query string, args map[string]interface{})

Source from the content-addressed store, hash-verified

302
303// bindMap binds a named parameter query with a map of arguments.
304func bindMap(bindType int, query string, args map[string]interface{}) (string, []interface{}, error) {
305 bound, names, err := compileNamedQuery([]byte(query), bindType)
306 if err != nil {
307 return "", []interface{}{}, err
308 }
309
310 arglist, err := bindMapArgs(names, args)
311 return bound, arglist, err
312}
313
314// -- Compilation of Named Queries
315

Callers 3

bindNamedMapperFunction · 0.85
TestBindMapFunction · 0.85
BenchmarkBindMapFunction · 0.85

Calls 2

compileNamedQueryFunction · 0.85
bindMapArgsFunction · 0.85

Tested by 2

TestBindMapFunction · 0.68
BenchmarkBindMapFunction · 0.68