aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/jmoiron/sqlx/bind.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/jmoiron/sqlx/bind.go')
-rw-r--r--vendor/github.com/jmoiron/sqlx/bind.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/jmoiron/sqlx/bind.go b/vendor/github.com/jmoiron/sqlx/bind.go
index 10f7bdf..0fdc443 100644
--- a/vendor/github.com/jmoiron/sqlx/bind.go
+++ b/vendor/github.com/jmoiron/sqlx/bind.go
@@ -21,7 +21,7 @@ const (
// BindType returns the bindtype for a given database given a drivername.
func BindType(driverName string) int {
switch driverName {
- case "postgres", "pgx":
+ case "postgres", "pgx", "pq-timeouts", "cloudsqlpostgres":
return DOLLAR
case "mysql":
return QUESTION
@@ -113,7 +113,8 @@ func In(query string, args ...interface{}) (string, []interface{}, error) {
v := reflect.ValueOf(arg)
t := reflectx.Deref(v.Type())
- if t.Kind() == reflect.Slice {
+ // []byte is a driver.Value type so it should not be expanded
+ if t.Kind() == reflect.Slice && t != reflect.TypeOf([]byte{}) {
meta[i].length = v.Len()
meta[i].v = v