diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2012-05-29 11:09:09 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2012-05-29 11:09:09 -0700 |
| commit | 93fe8c0c9333b0392b2a5cf2981cb068de9441ba (patch) | |
| tree | 70cfa9bb82335f0a296a4d08b095721a0bec8726 /src/pkg/database/sql/sql_test.go | |
| parent | 6dbaa206fbe7345fac181ec3d91a4157d5532fbd (diff) | |
| download | go-93fe8c0c9333b0392b2a5cf2981cb068de9441ba.tar.xz | |
database/sql: use driver.ColumnConverter everywhere consistently
It was only being used for (*Stmt).Exec, not Query, and not for
the same two methods on *DB.
This unifies (*Stmt).Exec's old inline code into the old
subsetArgs function, renaming it in the process (changing the
old word "subset" to "driver", mostly converted earlier)
Fixes #3640
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6258045
Diffstat (limited to 'src/pkg/database/sql/sql_test.go')
| -rw-r--r-- | src/pkg/database/sql/sql_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/database/sql/sql_test.go b/src/pkg/database/sql/sql_test.go index b296705865..1bfb59020b 100644 --- a/src/pkg/database/sql/sql_test.go +++ b/src/pkg/database/sql/sql_test.go @@ -306,8 +306,8 @@ func TestExec(t *testing.T) { {[]interface{}{7, 9}, ""}, // Invalid conversions: - {[]interface{}{"Brad", int64(0xFFFFFFFF)}, "sql: converting Exec argument #1's type: sql/driver: value 4294967295 overflows int32"}, - {[]interface{}{"Brad", "strconv fail"}, "sql: converting Exec argument #1's type: sql/driver: value \"strconv fail\" can't be converted to int32"}, + {[]interface{}{"Brad", int64(0xFFFFFFFF)}, "sql: converting argument #1's type: sql/driver: value 4294967295 overflows int32"}, + {[]interface{}{"Brad", "strconv fail"}, "sql: converting argument #1's type: sql/driver: value \"strconv fail\" can't be converted to int32"}, // Wrong number of args: {[]interface{}{}, "sql: expected 2 arguments, got 0"}, |
