-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
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
Fix query result lazy loading #186
Fix query result lazy loading #186
Conversation
@pboling @richardhsu I propose to not merge open PRs untill new release. I beleive we should release new version with bug fixes ASAP |
I agree, this will be merged after the new release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. Minor changes to a comment.
lib/dynamoid/criteria/chain.rb
Outdated
@@ -56,9 +56,11 @@ def all | |||
end | |||
|
|||
# Returns the last fetched record matched the criteria | |||
# Enumerable doesn't implement it, only `first` | |||
# So we have to implement it themselves |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it
=> last
(more specific)
themselves
=> ourselves
(grammar)
@pboling done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
@andrykonchin Dynamoid 1.3.4 is released. This should be rebased / build fixed and merged! |
done |
I have created a 1-3-stable branch for maintenance of the old version (current release), so now we can start working on the next version, which I expect will have major breaking changes, and so should be version 2.0.0. |
Old behaviour of
Model.where({}).all
:Proposed behaviour - always return lazy evaluated collection
It means
Model.where({}).all
returnsEnumerator
instead ofArray
. If you needArray
interface you have to convert collection toArray
manually withto_a
method call