1package pgx 2 3import ( 4 "database/sql/driver" 5 6 "github.com/jackc/pgtype" 7) 8 9func convertDriverValuers(args []interface{}) ([]interface{}, error) { 10 for i, arg := range args { 11 switch arg := arg.(type) { 12 case pgtype.BinaryEncoder: 13 case pgtype.TextEncoder: 14 case driver.Valuer: 15 v, err := callValuerValue(arg) 16 if err != nil { 17 return nil, err 18 } 19 args[i] = v 20 } 21 } 22 return args, nil 23} 24