Skip to content

Commit a8142d0

Browse files
alnrory-bot
authored andcommitted
fix: incorrect usage of database/sql
GitOrigin-RevId: a6bc423928fb9910a76e0b18afa2fc2a56fc052d
1 parent 3ad64db commit a8142d0

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

oryx/sqlxx/batch/create.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,6 @@ func Create[T any](ctx context.Context, p *TracerConnection, models []*T, opts .
246246
// Databases not supporting RETURNING will just return 0 rows.
247247
count := 0
248248
for rows.Next() {
249-
if err := rows.Err(); err != nil {
250-
return sqlcon.HandleError(err)
251-
}
252-
253249
if err := setModelID(rows, pop.NewModel(models[count], ctx)); err != nil {
254250
return err
255251
}
@@ -260,10 +256,6 @@ func Create[T any](ctx context.Context, p *TracerConnection, models []*T, opts .
260256
return sqlcon.HandleError(err)
261257
}
262258

263-
if err := rows.Close(); err != nil {
264-
return sqlcon.HandleError(err)
265-
}
266-
267259
return sqlcon.HandleError(err)
268260
}
269261

0 commit comments

Comments
 (0)