We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://api.rubyonrails.org/classes/ActiveRecord/Batches.html#method-i-find_each
For example, current code using .all:
.all
def find_all orm_class.all.lazy.map do |orm_object| resource_factory.to_resource(object: orm_object) end end
Could be updated to
def find_all orm_class.find_each.lazy.map do |orm_object| resource_factory.to_resource(object: orm_object) end end
#find_all_of_model has a where clause, but it could still benefit from find_each since that can be a large query.
#find_all_of_model
find_each
The text was updated successfully, but these errors were encountered:
Yeah that sounds great! We do something similar in the sequel plugin.
Sorry, something went wrong.
Use find_each, closes #924
d163969
Successfully merging a pull request may close this issue.
https://api.rubyonrails.org/classes/ActiveRecord/Batches.html#method-i-find_each
For example, current code using
.all
:Could be updated to
#find_all_of_model
has a where clause, but it could still benefit fromfind_each
since that can be a large query.The text was updated successfully, but these errors were encountered: