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

Method MapperFunc

sqlx.go:283–285  ·  view source on GitHub ↗

MapperFunc sets a new mapper for this db using the default sqlx struct tag and the provided mapper function.

(mf func(string) string)

Source from the content-addressed store, hash-verified

281// MapperFunc sets a new mapper for this db using the default sqlx struct tag
282// and the provided mapper function.
283func (db *DB) MapperFunc(mf func(string) string) {
284 db.Mapper = reflectx.NewMapperFunc("db", mf)
285}
286
287// Rebind transforms a query from QUESTION to the DB driver's bindvar type.
288func (db *DB) Rebind(query string) string {

Callers 2

TestUsageFunction · 0.80
TestUsageContextFunction · 0.80

Calls 1

NewMapperFuncFunction · 0.92

Tested by 2

TestUsageFunction · 0.64
TestUsageContextFunction · 0.64