diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2012-02-06 10:06:22 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2012-02-06 10:06:22 -0800 |
| commit | 9c060b8d60f14d930e5eadd7c9968ee2ba4f4131 (patch) | |
| tree | 64c82ef25c9a16460d64a64f60d835dbcff93044 /src/pkg/database/sql/sql.go | |
| parent | 6392b43a1583f5ccf5a3f7c38f096e8dd5403b0d (diff) | |
| download | go-9c060b8d60f14d930e5eadd7c9968ee2ba4f4131.tar.xz | |
database/sql: permit scanning into interface{}
See thread http://goo.gl/7zzzU for background.
R=rsc
CC=golang-dev
https://golang.org/cl/5624051
Diffstat (limited to 'src/pkg/database/sql/sql.go')
| -rw-r--r-- | src/pkg/database/sql/sql.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/database/sql/sql.go b/src/pkg/database/sql/sql.go index 34a7652105..436d4953ec 100644 --- a/src/pkg/database/sql/sql.go +++ b/src/pkg/database/sql/sql.go @@ -880,6 +880,10 @@ func (rs *Rows) Columns() ([]string, error) { // be modified and held indefinitely. The copy can be avoided by using // an argument of type *RawBytes instead; see the documentation for // RawBytes for restrictions on its use. +// +// If an argument has type *interface{}, Scan copies the value +// provided by the underlying driver without conversion. If the value +// is of type []byte, a copy is made and the caller owns the result. func (rs *Rows) Scan(dest ...interface{}) error { if rs.closed { return errors.New("sql: Rows closed") |
