Skip to content

Commit

Permalink
fix(helper): 查询结束后,需要调用rows.Err()返回可能存在的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
yeaha committed Dec 26, 2023
1 parent a4aeddc commit 6006fa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func QueryBy(ctx context.Context, db DB, stmt *goqu.SelectDataset, fn func(ctx c
return fmt.Errorf("handle row, %w", err)
}
}
return nil
return rows.Err()
}

// Pagination 数据库分页计算
Expand Down

0 comments on commit 6006fa0

Please sign in to comment.