From de6d2c524430287c699aaa898c1325da6afea539 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Wed, 20 Jun 2018 22:39:07 +0100 Subject: Update dependencies --- vendor/github.com/jmoiron/sqlx/bind.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/jmoiron/sqlx/bind.go') 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 -- cgit v1.2.3