MapperFunc sets a new mapper for this db using the default sqlx struct tag and the provided mapper function.
(mf func(string) string)
| 281 | // MapperFunc sets a new mapper for this db using the default sqlx struct tag |
| 282 | // and the provided mapper function. |
| 283 | func (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. |
| 288 | func (db *DB) Rebind(query string) string { |