aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2025-12-11 13:55:33 -0500
committerAustin Clements <austin@google.com>2025-12-11 11:57:52 -0800
commitae62a1bd365fca4c41d8b29d62cca240ab45b212 (patch)
treedb12680ce12e2f7efd5a05bc032a9e96f8e8d23c /src/database/sql/sql.go
parent89614ad264803558cfa36d460d431f7cbd4bae47 (diff)
downloadgo-ae62a1bd365fca4c41d8b29d62cca240ab45b212.tar.xz
Revert "database/sql: allow drivers to override Scan behavior"
This reverts CL 588435. This new API is difficult to use correctly, and in many cases cannot be used efficiently. We're going to work on this problem a bit more. The release notes are removed by CL 729340, since they were moved to the x/website repository since the original CL was made. Reopens #67546. Change-Id: I2a2bd25f2fce5f02e4d28cd33a9cc651bf35ab50 Reviewed-on: https://go-review.googlesource.com/c/go/+/729360 Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev>
Diffstat (limited to 'src/database/sql/sql.go')
-rw-r--r--src/database/sql/sql.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go
index 85b9ffc37d..4be450ca87 100644
--- a/src/database/sql/sql.go
+++ b/src/database/sql/sql.go
@@ -3396,16 +3396,7 @@ func (rs *Rows) scanLocked(dest ...any) error {
}
for i, sv := range rs.lastcols {
- err := driver.ErrSkip
-
- if rcs, ok := rs.rowsi.(driver.RowsColumnScanner); ok {
- err = rcs.ScanColumn(dest[i], i)
- }
-
- if err == driver.ErrSkip {
- err = convertAssignRows(dest[i], sv, rs)
- }
-
+ err := convertAssignRows(dest[i], sv, rs)
if err != nil {
return fmt.Errorf(`sql: Scan error on column index %d, name %q: %w`, i, rs.rowsi.Columns()[i], err)
}