I found in this commit the implementation of db.Scan has changed, now(v1.20.1) it use row processor to execute instead of query processor which breaks previous behaviors of db.Scan method. I try to add a callback after row, it likes db.Callback().Row().After("gorm:row").Register("decrypt_data", decryptData) but since the dest is explicitly specified after call db.ScanRows method in db.Scan, how can I do some extra work after query(such as decrypt sensitive data)?
Hello,
Yes, the Scan methods should not call Hooks methods, so I made the change, it doesn't make sense to have another methods to works exactly like Find, any reason that don't use Find?
Hello,
Yes, the
Scanmethods should not callHooksmethods, so I made the change, it doesn't make sense to have another methods to works exactly likeFind, any reason that don't useFind?
No, just want to get a confirmation. I will replace Scan method in my legacy code with Find method. Thank you for your prompt reply.