Closed asgaru84 closed 2 years ago
Hello! The intention here is to only select fields that you actually need. So no SELECT *
. This way even if you add a new column via DB migration and the code stays the same it won't crash.
Besides that I agree, it makes sense to have such an option. There is an open issue about this: https://github.com/georgysavva/scany/issues/72
We outline possible solutions there. If you are interested, you are welcome to shoot a PR!
Is your feature request related to a problem? Please describe. Problem is in
no corresponding field found
error. Columns that not yet present in struct are OK, because migrations come first and code comes second, crash between two steps is unacceptableDescribe the solution you'd like I want option to skip columns that don't have corresponding fields in destination struct